зеркало из 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">
|
<plist version="0.9">
|
||||||
<dict>
|
<dict>
|
||||||
<key>IBDocumentLocation</key>
|
<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>
|
<key>IBEditorPositions</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>124</key>
|
<key>124</key>
|
||||||
|
@ -39,11 +39,7 @@
|
||||||
<string>4</string>
|
<string>4</string>
|
||||||
<key>IBLockedObjects</key>
|
<key>IBLockedObjects</key>
|
||||||
<array/>
|
<array/>
|
||||||
<key>IBOpenObjects</key>
|
|
||||||
<array>
|
|
||||||
<integer>10</integer>
|
|
||||||
</array>
|
|
||||||
<key>IBSystem Version</key>
|
<key>IBSystem Version</key>
|
||||||
<string>5S60</string>
|
<string>5S66</string>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</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;
|
ICInstance icInstance = NULL;
|
||||||
OSStatus error;
|
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
|
// all that code into the plugin
|
||||||
error = ICStart(&icInstance, 'CHIM');
|
error = ICStart(&icInstance, 'CHIM');
|
||||||
if (error != noErr) {
|
if (error != noErr) {
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
// Hookup cookie prefs. Relies on the tags of the radio buttons in the matrix being
|
// 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
|
// 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.
|
// at startup.
|
||||||
PRInt32 acceptCookies = 0;
|
PRInt32 acceptCookies = 0;
|
||||||
mPrefService->GetIntPref("network.cookie.cookieBehavior", &acceptCookies);
|
mPrefService->GetIntPref("network.cookie.cookieBehavior", &acceptCookies);
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<key>AppleEventCode</key>
|
<key>AppleEventCode</key>
|
||||||
<string>GURL</string>
|
<string>GURL</string>
|
||||||
<key>CommandClass</key>
|
<key>CommandClass</key>
|
||||||
<string>CHGetURLCommand</string>
|
<string>GetURLCommand</string>
|
||||||
</dict>
|
</dict>
|
||||||
<key>OpenURL</key>
|
<key>OpenURL</key>
|
||||||
<dict>
|
<dict>
|
||||||
|
@ -22,7 +22,7 @@
|
||||||
<key>AppleEventCode</key>
|
<key>AppleEventCode</key>
|
||||||
<string>OURL</string>
|
<string>OURL</string>
|
||||||
<key>CommandClass</key>
|
<key>CommandClass</key>
|
||||||
<string>CHGetURLCommand</string>
|
<string>GetURLCommand</string>
|
||||||
</dict>
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
<key>Name</key>
|
<key>Name</key>
|
||||||
|
|
|
@ -1,5 +1,13 @@
|
||||||
{
|
{
|
||||||
IBClasses = (
|
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; },
|
{CLASS = BookmarkItem; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
||||||
{
|
{
|
||||||
ACTIONS = {
|
ACTIONS = {
|
||||||
|
@ -20,6 +28,11 @@
|
||||||
};
|
};
|
||||||
SUPERCLASS = NSObject;
|
SUPERCLASS = NSObject;
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
CLASS = BookmarksOutlineView;
|
||||||
|
LANGUAGE = ObjC;
|
||||||
|
SUPERCLASS = ExtendedOutlineView;
|
||||||
|
},
|
||||||
{CLASS = BookmarksToolbar; LANGUAGE = ObjC; SUPERCLASS = NSView; },
|
{CLASS = BookmarksToolbar; LANGUAGE = ObjC; SUPERCLASS = NSView; },
|
||||||
{CLASS = BrowserTabView; LANGUAGE = ObjC; SUPERCLASS = NSTabView; },
|
{CLASS = BrowserTabView; LANGUAGE = ObjC; SUPERCLASS = NSTabView; },
|
||||||
{
|
{
|
||||||
|
@ -65,7 +78,7 @@
|
||||||
mBackItem = NSMenuItem;
|
mBackItem = NSMenuItem;
|
||||||
mCachedBMDS = id;
|
mCachedBMDS = id;
|
||||||
mForwardItem = NSMenuItem;
|
mForwardItem = NSMenuItem;
|
||||||
mHistoryDataSource = CHHistoryDataSource;
|
mHistoryDataSource = HistoryDataSource;
|
||||||
mImageLinkMenu = NSMenu;
|
mImageLinkMenu = NSMenu;
|
||||||
mImageMenu = NSMenu;
|
mImageMenu = NSMenu;
|
||||||
mInputMenu = NSMenu;
|
mInputMenu = NSMenu;
|
||||||
|
@ -75,7 +88,7 @@
|
||||||
mLocationToolbarView = NSView;
|
mLocationToolbarView = NSView;
|
||||||
mLock = NSImageView;
|
mLock = NSImageView;
|
||||||
mPageMenu = NSMenu;
|
mPageMenu = NSMenu;
|
||||||
mPersonalToolbar = CHBookmarksToolbar;
|
mPersonalToolbar = BookmarksToolbar;
|
||||||
mProgress = NSProgressIndicator;
|
mProgress = NSProgressIndicator;
|
||||||
mProxyIcon = NSImageView;
|
mProxyIcon = NSImageView;
|
||||||
mSidebarBookmarksDataSource = BookmarksDataSource;
|
mSidebarBookmarksDataSource = BookmarksDataSource;
|
||||||
|
@ -85,28 +98,14 @@
|
||||||
mSidebarTabView = NSTabView;
|
mSidebarTabView = NSTabView;
|
||||||
mStatus = NSTextField;
|
mStatus = NSTextField;
|
||||||
mStatusBar = NSView;
|
mStatusBar = NSView;
|
||||||
mTabBrowser = CHExtendedTabView;
|
mTabBrowser = BrowserTabView;
|
||||||
mURLBar = NSTextField;
|
mURLBar = NSTextField;
|
||||||
};
|
};
|
||||||
SUPERCLASS = NSWindowController;
|
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; };
|
ACTIONS = {load = id; };
|
||||||
CLASS = CHBrowserWrapper;
|
CLASS = BrowserWrapper;
|
||||||
LANGUAGE = ObjC;
|
LANGUAGE = ObjC;
|
||||||
OUTLETS = {
|
OUTLETS = {
|
||||||
mLockIcon = id;
|
mLockIcon = id;
|
||||||
|
@ -118,43 +117,23 @@
|
||||||
};
|
};
|
||||||
SUPERCLASS = NSView;
|
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;
|
LANGUAGE = ObjC;
|
||||||
OUTLETS = {mBrowserWindowController = id; };
|
OUTLETS = {mBrowserWindowController = id; };
|
||||||
SUPERCLASS = CHRDFOutlineViewDataSource;
|
SUPERCLASS = RDFOutlineViewDataSource;
|
||||||
},
|
},
|
||||||
{CLASS = CHLocationBar; LANGUAGE = ObjC; SUPERCLASS = NSView; },
|
{CLASS = LocationBar; LANGUAGE = ObjC; SUPERCLASS = NSView; },
|
||||||
{CLASS = CHPageProxyIcon; LANGUAGE = ObjC; SUPERCLASS = NSImageView; },
|
{CLASS = MainController; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
||||||
|
{CLASS = PageProxyIcon; LANGUAGE = ObjC; SUPERCLASS = NSImageView; },
|
||||||
{
|
{
|
||||||
CLASS = CHRDFOutlineViewDataSource;
|
CLASS = RDFOutlineViewDataSource;
|
||||||
LANGUAGE = ObjC;
|
LANGUAGE = ObjC;
|
||||||
OUTLETS = {mOutlineView = id; };
|
OUTLETS = {mOutlineView = id; };
|
||||||
SUPERCLASS = NSObject;
|
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 = RDFOutlineViewItem; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
||||||
{CLASS = ThrobberHandler; LANGUAGE = ObjC; SUPERCLASS = NSObject; }
|
{CLASS = ThrobberHandler; LANGUAGE = ObjC; SUPERCLASS = NSObject; }
|
||||||
);
|
);
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<plist version="0.9">
|
<plist version="0.9">
|
||||||
<dict>
|
<dict>
|
||||||
<key>IBDocumentLocation</key>
|
<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>
|
<key>IBEditorPositions</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>124</key>
|
<key>124</key>
|
||||||
|
@ -39,11 +39,7 @@
|
||||||
<string>4</string>
|
<string>4</string>
|
||||||
<key>IBLockedObjects</key>
|
<key>IBLockedObjects</key>
|
||||||
<array/>
|
<array/>
|
||||||
<key>IBOpenObjects</key>
|
|
||||||
<array>
|
|
||||||
<integer>10</integer>
|
|
||||||
</array>
|
|
||||||
<key>IBSystem Version</key>
|
<key>IBSystem Version</key>
|
||||||
<string>5S60</string>
|
<string>5S66</string>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</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;
|
LANGUAGE = ObjC;
|
||||||
SUPERCLASS = ToolbarController;
|
SUPERCLASS = ToolbarController;
|
||||||
},
|
},
|
||||||
{CLASS = CHGoMenu; LANGUAGE = ObjC; SUPERCLASS = NSMenu; },
|
|
||||||
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
||||||
|
{CLASS = GoMenu; LANGUAGE = ObjC; SUPERCLASS = NSMenu; },
|
||||||
{
|
{
|
||||||
ACTIONS = {
|
ACTIONS = {
|
||||||
addBookmark = id;
|
addBookmark = id;
|
||||||
|
|
Двоичный файл не отображается.
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
#import <Foundation/Foundation.h>
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
@interface CHGetURLCommand : NSScriptCommand {}
|
@interface GetURLCommand : NSScriptCommand {}
|
||||||
|
|
||||||
- (id)performDefaultImplementation;
|
- (id)performDefaultImplementation;
|
||||||
|
|
||||||
|
|
|
@ -21,12 +21,12 @@
|
||||||
* David Hyatt <hyatt@netscape.com> (Original Author)
|
* David Hyatt <hyatt@netscape.com> (Original Author)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import "CHGetURLCommand.h"
|
#import "GetURLCommand.h"
|
||||||
#import <AppKit/AppKit.h>
|
#import <AppKit/AppKit.h>
|
||||||
|
|
||||||
#import "MainController.h"
|
#import "MainController.h"
|
||||||
|
|
||||||
@implementation CHGetURLCommand
|
@implementation GetURLCommand
|
||||||
|
|
||||||
- (id)performDefaultImplementation
|
- (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 ***** */
|
* ***** END LICENSE BLOCK ***** */
|
||||||
|
|
||||||
#import "CHAboutBox.h"
|
#import "AboutBox.h"
|
||||||
|
|
||||||
#include "nsBuildID.h"
|
#include "nsBuildID.h"
|
||||||
|
|
||||||
@interface CHAboutBox(Private)
|
@interface AboutBox(Private)
|
||||||
- (void)loadWindow;
|
- (void)loadWindow;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation CHAboutBox
|
@implementation AboutBox
|
||||||
|
|
||||||
static CHAboutBox *sharedInstance = nil;
|
static AboutBox *sharedInstance = nil;
|
||||||
|
|
||||||
+ (CHAboutBox *)sharedInstance
|
+ (AboutBox *)sharedInstance
|
||||||
{
|
{
|
||||||
return sharedInstance ? sharedInstance : [[self alloc] init];
|
return sharedInstance ? sharedInstance : [[self alloc] init];
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,9 +38,9 @@
|
||||||
#import <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
#import "BrowserWindowController.h"
|
#import "BrowserWindowController.h"
|
||||||
#import "MVPreferencesController.h"
|
#import "MVPreferencesController.h"
|
||||||
#import "CHSplashScreenWindow.h"
|
#import "SplashScreenWindow.h"
|
||||||
#import "FindDlgController.h"
|
#import "FindDlgController.h"
|
||||||
#import "CHPreferenceManager.h"
|
#import "PreferenceManager.h"
|
||||||
|
|
||||||
class BookmarksService;
|
class BookmarksService;
|
||||||
|
|
||||||
|
@ -67,9 +67,9 @@ class BookmarksService;
|
||||||
|
|
||||||
BOOL mOffline;
|
BOOL mOffline;
|
||||||
|
|
||||||
CHSplashScreenWindow* mSplashScreen;
|
SplashScreenWindow* mSplashScreen;
|
||||||
|
|
||||||
CHPreferenceManager* mPreferenceManager;
|
PreferenceManager* mPreferenceManager;
|
||||||
|
|
||||||
BookmarksService* mMenuBookmarks;
|
BookmarksService* mMenuBookmarks;
|
||||||
|
|
||||||
|
@ -142,7 +142,7 @@ class BookmarksService;
|
||||||
|
|
||||||
- (MVPreferencesController *)preferencesController;
|
- (MVPreferencesController *)preferencesController;
|
||||||
- (void)displayPreferencesWindow:sender;
|
- (void)displayPreferencesWindow:sender;
|
||||||
- (CHPreferenceManager *)preferenceManager;
|
- (PreferenceManager *)preferenceManager;
|
||||||
- (BOOL)isMainWindowABrowserWindow;
|
- (BOOL)isMainWindowABrowserWindow;
|
||||||
|
|
||||||
// if the main window is a browser window, return its controller, otherwise nil
|
// if the main window is a browser window, return its controller, otherwise nil
|
||||||
|
|
|
@ -41,9 +41,9 @@
|
||||||
#import "MainController.h"
|
#import "MainController.h"
|
||||||
#import "BrowserWindowController.h"
|
#import "BrowserWindowController.h"
|
||||||
#import "BookmarksService.h"
|
#import "BookmarksService.h"
|
||||||
#import "nsCocoaBrowserService.h"
|
#import "CHBrowserService.h"
|
||||||
#import "CHAboutBox.h"
|
#import "AboutBox.h"
|
||||||
#import "CHUserDefaults.h"
|
#import "UserDefaults.h"
|
||||||
|
|
||||||
#include "nsCOMPtr.h"
|
#include "nsCOMPtr.h"
|
||||||
#include "nsEmbedAPI.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];
|
NSString* url = [defaults stringForKey:USER_DEFAULTS_URL_KEY];
|
||||||
mStartURL = url ? [url retain] : nil;
|
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;
|
mFindDialog = nil;
|
||||||
mMenuBookmarks = nil;
|
mMenuBookmarks = nil;
|
||||||
|
|
||||||
|
@ -170,7 +170,7 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
|
||||||
[mPreferencesController release];
|
[mPreferencesController release];
|
||||||
[mPreferenceManager release];
|
[mPreferenceManager release];
|
||||||
|
|
||||||
nsCocoaBrowserService::TermEmbedding();
|
CHBrowserService::TermEmbedding();
|
||||||
|
|
||||||
[self autorelease];
|
[self autorelease];
|
||||||
}
|
}
|
||||||
|
@ -556,10 +556,10 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
|
||||||
[[browserWindow windowController] manageBookmarks: aSender];
|
[[browserWindow windowController] manageBookmarks: aSender];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (CHPreferenceManager *)preferenceManager
|
- (PreferenceManager *)preferenceManager
|
||||||
{
|
{
|
||||||
if (!mPreferenceManager)
|
if (!mPreferenceManager)
|
||||||
mPreferenceManager = [[CHPreferenceManager sharedInstance] retain];
|
mPreferenceManager = [[PreferenceManager sharedInstance] retain];
|
||||||
return mPreferenceManager;
|
return mPreferenceManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -578,7 +578,7 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
|
||||||
|
|
||||||
- (IBAction)showAboutBox:(id)sender
|
- (IBAction)showAboutBox:(id)sender
|
||||||
{
|
{
|
||||||
[[CHAboutBox sharedInstance] showPanel:sender];
|
[[AboutBox sharedInstance] showPanel:sender];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename
|
- (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
#import <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
|
|
||||||
@interface CHSplashScreenWindow : NSWindow {
|
@interface SplashScreenWindow : NSWindow {
|
||||||
BOOL _fades;
|
BOOL _fades;
|
||||||
BOOL __didFadeIn;
|
BOOL __didFadeIn;
|
||||||
int _fadeIndex;
|
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;
|
@class BookmarkItem;
|
||||||
|
|
||||||
@interface CHBookmarksButton : NSButton
|
@interface BookmarksButton : NSButton
|
||||||
{
|
{
|
||||||
nsIDOMElement* mElement;
|
nsIDOMElement* mElement;
|
||||||
BookmarkItem* mBookmarkItem;
|
BookmarkItem* mBookmarkItem;
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import "NSString+Utils.h"
|
#import "NSString+Utils.h"
|
||||||
#import "CHBookmarksButton.h"
|
#import "BookmarksButton.h"
|
||||||
|
|
||||||
#include "nsCOMPtr.h"
|
#include "nsCOMPtr.h"
|
||||||
#include "nsIContent.h"
|
#include "nsIContent.h"
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
#import "BookmarksDataSource.h"
|
#import "BookmarksDataSource.h"
|
||||||
#import "BookmarksService.h"
|
#import "BookmarksService.h"
|
||||||
|
|
||||||
@implementation CHBookmarksButton
|
@implementation BookmarksButton
|
||||||
|
|
||||||
- (id)initWithFrame:(NSRect)frame
|
- (id)initWithFrame:(NSRect)frame
|
||||||
{
|
{
|
||||||
|
@ -163,7 +163,7 @@
|
||||||
// Make a copy of the context menu but change it to target us
|
// 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
|
// 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
|
// 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];
|
NSMenu* myMenu = [[[self superview] menu] copy];
|
||||||
[[myMenu itemArray] makeObjectsPerformSelector:@selector(setTarget:) withObject: self];
|
[[myMenu itemArray] makeObjectsPerformSelector:@selector(setTarget:) withObject: self];
|
||||||
|
|
|
@ -41,8 +41,8 @@
|
||||||
#import <Appkit/Appkit.h>
|
#import <Appkit/Appkit.h>
|
||||||
|
|
||||||
#import "MainController.h"
|
#import "MainController.h"
|
||||||
#import "CHBookmarksToolbar.h"
|
#import "BookmarksToolbar.h"
|
||||||
#import "CHExtendedOutlineView.h"
|
#import "ExtendedOutlineView.h"
|
||||||
|
|
||||||
class nsIContent;
|
class nsIContent;
|
||||||
class BookmarksService;
|
class BookmarksService;
|
||||||
|
|
|
@ -22,9 +22,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import <AppKit/AppKit.h>
|
#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)
|
* Joe Hewitt <hewitt@netscape.com> (Original Author)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import "CHBookmarksOutlineView.h"
|
#import "BookmarksOutlineView.h"
|
||||||
#import "BookmarksService.h"
|
#import "BookmarksService.h"
|
||||||
#import "BookmarksDataSource.h"
|
#import "BookmarksDataSource.h"
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
#include "nsIContent.h"
|
#include "nsIContent.h"
|
||||||
#include "nsIDOMNode.h"
|
#include "nsIDOMNode.h"
|
||||||
|
|
||||||
@implementation CHBookmarksOutlineView
|
@implementation BookmarksOutlineView
|
||||||
|
|
||||||
- (void)awakeFromNib
|
- (void)awakeFromNib
|
||||||
{
|
{
|
||||||
|
|
|
@ -44,8 +44,8 @@
|
||||||
#include "nsVoidArray.h"
|
#include "nsVoidArray.h"
|
||||||
|
|
||||||
#import "MainController.h"
|
#import "MainController.h"
|
||||||
#import "CHBookmarksToolbar.h"
|
#import "BookmarksToolbar.h"
|
||||||
#import "CHExtendedOutlineView.h"
|
#import "ExtendedOutlineView.h"
|
||||||
|
|
||||||
class nsIAtom;
|
class nsIAtom;
|
||||||
class nsIDOMHTMLDocument;
|
class nsIDOMHTMLDocument;
|
||||||
|
@ -60,7 +60,7 @@ class BookmarksService
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
BookmarksService(BookmarksDataSource* aDataSource);
|
BookmarksService(BookmarksDataSource* aDataSource);
|
||||||
BookmarksService(CHBookmarksToolbar* aToolbar);
|
BookmarksService(BookmarksToolbar* aToolbar);
|
||||||
virtual ~BookmarksService();
|
virtual ~BookmarksService();
|
||||||
|
|
||||||
void AddObserver();
|
void AddObserver();
|
||||||
|
@ -139,7 +139,7 @@ private:
|
||||||
// There are three kinds of bookmarks data sources:
|
// There are three kinds of bookmarks data sources:
|
||||||
// tree views (mDataSource), the personal toolbar (mToolbar)
|
// tree views (mDataSource), the personal toolbar (mToolbar)
|
||||||
// and menus (gBookmarksMenu).
|
// and menus (gBookmarksMenu).
|
||||||
CHBookmarksToolbar* mToolbar;
|
BookmarksToolbar* mToolbar;
|
||||||
BookmarksDataSource* mDataSource;
|
BookmarksDataSource* mDataSource;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
|
|
||||||
#import "NSString+Utils.h"
|
#import "NSString+Utils.h"
|
||||||
|
|
||||||
#import "CHPreferenceManager.h"
|
#import "PreferenceManager.h"
|
||||||
#import "CHBrowserView.h"
|
#import "CHBrowserView.h"
|
||||||
#import "BookmarksService.h"
|
#import "BookmarksService.h"
|
||||||
#import "BookmarksDataSource.h"
|
#import "BookmarksDataSource.h"
|
||||||
|
@ -132,7 +132,7 @@ BookmarksService::BookmarksService(BookmarksDataSource* aDataSource)
|
||||||
mToolbar = nil;
|
mToolbar = nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
BookmarksService::BookmarksService(CHBookmarksToolbar* aToolbar)
|
BookmarksService::BookmarksService(BookmarksToolbar* aToolbar)
|
||||||
{
|
{
|
||||||
mDataSource = nil;
|
mDataSource = nil;
|
||||||
mToolbar = aToolbar;
|
mToolbar = aToolbar;
|
||||||
|
@ -629,7 +629,7 @@ BookmarksService::CreateIconForBookmark(nsIDOMElement* aElement)
|
||||||
return [NSImage imageNamed:@"folder"];
|
return [NSImage imageNamed:@"folder"];
|
||||||
|
|
||||||
// fire off a proxy icon load
|
// 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;
|
nsAutoString href;
|
||||||
content->GetAttr(kNameSpaceID_None, gHrefAtom, 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.
|
// XXX this needs fixing to not max out the number of tabs in a browser window.
|
||||||
// See [BrowserWindowController newTabsAllowed];
|
// See [BrowserWindowController newTabsAllowed];
|
||||||
tabViewItem = [BrowserTabView makeNewTabItem];
|
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 setLabel: NSLocalizedString(@"UntitledPageTitle", @"")];
|
||||||
[tabViewItem setView: newView];
|
[tabViewItem setView: newView];
|
||||||
[aTabView addTabViewItem: tabViewItem];
|
[aTabView addTabViewItem: tabViewItem];
|
||||||
|
|
|
@ -26,13 +26,13 @@
|
||||||
class nsIDOMElement;
|
class nsIDOMElement;
|
||||||
|
|
||||||
class BookmarksService;
|
class BookmarksService;
|
||||||
class CHBookmarksButton;
|
class BookmarksButton;
|
||||||
|
|
||||||
@interface CHBookmarksToolbar : NSView
|
@interface BookmarksToolbar : NSView
|
||||||
{
|
{
|
||||||
BookmarksService* mBookmarks;
|
BookmarksService* mBookmarks;
|
||||||
NSMutableArray* mButtons;
|
NSMutableArray* mButtons;
|
||||||
CHBookmarksButton* mDragInsertionButton;
|
BookmarksButton* mDragInsertionButton;
|
||||||
int mDragInsertionPosition;
|
int mDragInsertionPosition;
|
||||||
BOOL mIsShowing;
|
BOOL mIsShowing;
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,19 +23,19 @@
|
||||||
* David Haas <haasd@cae.wisc.edu>
|
* David Haas <haasd@cae.wisc.edu>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import "CHBookmarksButton.h"
|
#import "BookmarksButton.h"
|
||||||
#import "CHBookmarksToolbar.h"
|
#import "BookmarksToolbar.h"
|
||||||
#import "BookmarksService.h"
|
#import "BookmarksService.h"
|
||||||
#import "BookmarksDataSource.h"
|
#import "BookmarksDataSource.h"
|
||||||
|
|
||||||
#include "nsIDOMElement.h"
|
#include "nsIDOMElement.h"
|
||||||
#include "nsIContent.h"
|
#include "nsIContent.h"
|
||||||
|
|
||||||
@interface CHBookmarksToolbar(Private)
|
@interface BookmarksToolbar(Private)
|
||||||
- (CHBookmarksButton*)makeNewButtonWithElement:(nsIDOMElement*)element;
|
- (BookmarksButton*)makeNewButtonWithElement:(nsIDOMElement*)element;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation CHBookmarksToolbar
|
@implementation BookmarksToolbar
|
||||||
|
|
||||||
- (id)initWithFrame:(NSRect)frame
|
- (id)initWithFrame:(NSRect)frame
|
||||||
{
|
{
|
||||||
|
@ -100,7 +100,7 @@
|
||||||
while (child) {
|
while (child) {
|
||||||
nsCOMPtr<nsIDOMElement> childElt(do_QueryInterface(child));
|
nsCOMPtr<nsIDOMElement> childElt(do_QueryInterface(child));
|
||||||
if (childElt) {
|
if (childElt) {
|
||||||
CHBookmarksButton* button = [self makeNewButtonWithElement:childElt];
|
BookmarksButton* button = [self makeNewButtonWithElement:childElt];
|
||||||
[self addSubview: button];
|
[self addSubview: button];
|
||||||
[mButtons addObject: button];
|
[mButtons addObject: button];
|
||||||
}
|
}
|
||||||
|
@ -115,7 +115,7 @@
|
||||||
|
|
||||||
-(void)addButton: (nsIDOMElement*)aElt atIndex: (int)aIndex
|
-(void)addButton: (nsIDOMElement*)aElt atIndex: (int)aIndex
|
||||||
{
|
{
|
||||||
CHBookmarksButton* button = [self makeNewButtonWithElement:aElt];
|
BookmarksButton* button = [self makeNewButtonWithElement:aElt];
|
||||||
[self addSubview: button];
|
[self addSubview: button];
|
||||||
[mButtons insertObject: button atIndex: aIndex];
|
[mButtons insertObject: button atIndex: aIndex];
|
||||||
if ([self isShown])
|
if ([self isShown])
|
||||||
|
@ -126,7 +126,7 @@
|
||||||
{
|
{
|
||||||
int count = [mButtons count];
|
int count = [mButtons count];
|
||||||
for (int i = 0; i < count; i++) {
|
for (int i = 0; i < count; i++) {
|
||||||
CHBookmarksButton* button = [mButtons objectAtIndex: i];
|
BookmarksButton* button = [mButtons objectAtIndex: i];
|
||||||
if ([button element] == aElt) {
|
if ([button element] == aElt) {
|
||||||
[button setElement: aElt];
|
[button setElement: aElt];
|
||||||
if (count > i && [self isShown])
|
if (count > i && [self isShown])
|
||||||
|
@ -142,7 +142,7 @@
|
||||||
{
|
{
|
||||||
int count = [mButtons count];
|
int count = [mButtons count];
|
||||||
for (int i = 0; i < count; i++) {
|
for (int i = 0; i < count; i++) {
|
||||||
CHBookmarksButton* button = [mButtons objectAtIndex: i];
|
BookmarksButton* button = [mButtons objectAtIndex: i];
|
||||||
if ([button element] == aElt) {
|
if ([button element] == aElt) {
|
||||||
[mButtons removeObjectAtIndex: i];
|
[mButtons removeObjectAtIndex: i];
|
||||||
[button removeFromSuperview];
|
[button removeFromSuperview];
|
||||||
|
@ -168,12 +168,12 @@
|
||||||
float currY = 1.0;
|
float currY = 1.0;
|
||||||
float prevX = 2.0;
|
float prevX = 2.0;
|
||||||
if (aIndex > 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;
|
prevX += [prevButton frame].origin.x + [prevButton frame].size.width;
|
||||||
currY = [prevButton frame].origin.y;
|
currY = [prevButton frame].origin.y;
|
||||||
}
|
}
|
||||||
for (int i = aIndex; i < count; i++) {
|
for (int i = aIndex; i < count; i++) {
|
||||||
CHBookmarksButton* button = [mButtons objectAtIndex: i];
|
BookmarksButton* button = [mButtons objectAtIndex: i];
|
||||||
[button sizeToFit];
|
[button sizeToFit];
|
||||||
float width = [button frame].size.width;
|
float width = [button frame].size.width;
|
||||||
float height = [button frame].size.height;
|
float height = [button frame].size.height;
|
||||||
|
@ -240,7 +240,7 @@
|
||||||
else {
|
else {
|
||||||
// We got smaller. Just go to the last button and see if it is outside
|
// We got smaller. Just go to the last button and see if it is outside
|
||||||
// our bounds.
|
// our bounds.
|
||||||
CHBookmarksButton* button = [mButtons objectAtIndex:(count-1)];
|
BookmarksButton* button = [mButtons objectAtIndex:(count-1)];
|
||||||
if ([button frame].origin.x + [button frame].size.width >
|
if ([button frame].origin.x + [button frame].size.width >
|
||||||
[self bounds].size.width - 2) {
|
[self bounds].size.width - 2) {
|
||||||
// The button doesn't fit any more. Reflow starting at this index.
|
// The button doesn't fit any more. Reflow starting at this index.
|
||||||
|
@ -285,7 +285,7 @@
|
||||||
mDragInsertionPosition = BookmarksService::CHInsertAfter;
|
mDragInsertionPosition = BookmarksService::CHInsertAfter;
|
||||||
|
|
||||||
for (int i = 0; i < count; ++i) {
|
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);
|
//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 :(
|
// 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
|
@end
|
||||||
|
|
|
@ -22,12 +22,12 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import <AppKit/AppKit.h>
|
#import <AppKit/AppKit.h>
|
||||||
#import "CHAutoCompleteTextField.h"
|
#import "AutoCompleteTextField.h"
|
||||||
#include "nsIAutoCompleteResults.h"
|
#include "nsIAutoCompleteResults.h"
|
||||||
|
|
||||||
@class CHAutoCompleteTextField;
|
@class AutoCompleteTextField;
|
||||||
|
|
||||||
@interface CHAutoCompleteDataSource : NSObject
|
@interface AutoCompleteDataSource : NSObject
|
||||||
{
|
{
|
||||||
NSImage *mIconImage;
|
NSImage *mIconImage;
|
||||||
|
|
||||||
|
|
|
@ -25,11 +25,11 @@
|
||||||
#import "NSString+Utils.h"
|
#import "NSString+Utils.h"
|
||||||
|
|
||||||
#import <AppKit/AppKit.h>
|
#import <AppKit/AppKit.h>
|
||||||
#import "CHAutoCompleteTextField.h"
|
#import "AutoCompleteTextField.h"
|
||||||
#include "nsString.h"
|
#include "nsString.h"
|
||||||
#include "nsCRT.h"
|
#include "nsCRT.h"
|
||||||
|
|
||||||
@implementation CHAutoCompleteDataSource
|
@implementation AutoCompleteDataSource
|
||||||
|
|
||||||
-(id)init
|
-(id)init
|
||||||
{
|
{
|
||||||
|
|
|
@ -23,20 +23,20 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import <AppKit/AppKit.h>
|
#import <AppKit/AppKit.h>
|
||||||
#import "CHAutoCompleteDataSource.h"
|
#import "AutoCompleteDataSource.h"
|
||||||
#include "nsIAutoCompleteSession.h"
|
#include "nsIAutoCompleteSession.h"
|
||||||
#include "nsIAutoCompleteResults.h"
|
#include "nsIAutoCompleteResults.h"
|
||||||
#include "nsIAutoCompleteListener.h"
|
#include "nsIAutoCompleteListener.h"
|
||||||
|
|
||||||
@class CHAutoCompleteDataSource, CHPageProxyIcon;
|
@class BookmarksOutlineView, PageProxyIcon;
|
||||||
|
|
||||||
@interface CHAutoCompleteTextField : NSTextField
|
@interface AutoCompleteTextField : NSTextField
|
||||||
{
|
{
|
||||||
IBOutlet CHPageProxyIcon *mProxyIcon;
|
IBOutlet PageProxyIcon *mProxyIcon;
|
||||||
NSWindow *mPopupWin;
|
NSWindow *mPopupWin;
|
||||||
NSTableView *mTableView;
|
NSTableView *mTableView;
|
||||||
|
|
||||||
CHAutoCompleteDataSource *mDataSource;
|
AutoCompleteDataSource *mDataSource;
|
||||||
|
|
||||||
nsIAutoCompleteSession *mSession;
|
nsIAutoCompleteSession *mSession;
|
||||||
nsIAutoCompleteResults *mResults;
|
nsIAutoCompleteResults *mResults;
|
||||||
|
|
|
@ -22,13 +22,13 @@
|
||||||
* David Haas <haasd@cae.wisc.edu>
|
* David Haas <haasd@cae.wisc.edu>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import "CHAutoCompleteTextField.h"
|
#import "AutoCompleteTextField.h"
|
||||||
#import "BrowserWindowController.h"
|
#import "BrowserWindowController.h"
|
||||||
#import "CHPageProxyIcon.h"
|
#import "PageProxyIcon.h"
|
||||||
#include "nsIServiceManager.h"
|
#include "nsIServiceManager.h"
|
||||||
#include "nsMemory.h"
|
#include "nsMemory.h"
|
||||||
#include "nsString.h"
|
#include "nsString.h"
|
||||||
#include "CHUserDefaults.h"
|
#include "UserDefaults.h"
|
||||||
|
|
||||||
static const int kMaxRows = 6;
|
static const int kMaxRows = 6;
|
||||||
static const int kFrameMargin = 1;
|
static const int kFrameMargin = 1;
|
||||||
|
@ -47,7 +47,7 @@ static const int kFrameMargin = 1;
|
||||||
class AutoCompleteListener : public nsIAutoCompleteListener
|
class AutoCompleteListener : public nsIAutoCompleteListener
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
AutoCompleteListener(CHAutoCompleteTextField* aTextField)
|
AutoCompleteListener(AutoCompleteTextField* aTextField)
|
||||||
{
|
{
|
||||||
NS_INIT_REFCNT();
|
NS_INIT_REFCNT();
|
||||||
mTextField = aTextField;
|
mTextField = aTextField;
|
||||||
|
@ -66,14 +66,14 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
CHAutoCompleteTextField *mTextField;
|
AutoCompleteTextField *mTextField;
|
||||||
};
|
};
|
||||||
|
|
||||||
NS_IMPL_ISUPPORTS1(AutoCompleteListener, nsIAutoCompleteListener)
|
NS_IMPL_ISUPPORTS1(AutoCompleteListener, nsIAutoCompleteListener)
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@implementation CHAutoCompleteTextField
|
@implementation AutoCompleteTextField
|
||||||
|
|
||||||
- (void) awakeFromNib
|
- (void) awakeFromNib
|
||||||
{
|
{
|
||||||
|
@ -137,7 +137,7 @@ NS_IMPL_ISUPPORTS1(AutoCompleteListener, nsIAutoCompleteListener)
|
||||||
[scrollView setDocumentView: mTableView];
|
[scrollView setDocumentView: mTableView];
|
||||||
|
|
||||||
// construct the datasource
|
// construct the datasource
|
||||||
mDataSource = [[CHAutoCompleteDataSource alloc] init];
|
mDataSource = [[AutoCompleteDataSource alloc] init];
|
||||||
[mTableView setDataSource: mDataSource];
|
[mTableView setDataSource: mDataSource];
|
||||||
|
|
||||||
[mPopupWin setContentView:scrollView];
|
[mPopupWin setContentView:scrollView];
|
||||||
|
|
|
@ -384,7 +384,7 @@
|
||||||
{
|
{
|
||||||
// We need to make a new tab.
|
// We need to make a new tab.
|
||||||
BrowserTabViewItem *tabViewItem= [BrowserTabView makeNewTabItem];
|
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 setLabel: NSLocalizedString(@"UntitledPageTitle", @"")];
|
||||||
[tabViewItem setView: newView];
|
[tabViewItem setView: newView];
|
||||||
[self addTabViewItem: tabViewItem];
|
[self addTabViewItem: tabViewItem];
|
||||||
|
|
|
@ -38,12 +38,12 @@
|
||||||
|
|
||||||
#import <Cocoa/Cocoa.h>
|
#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;
|
@class BrowserTabItemContainerView;
|
||||||
|
|
||||||
@interface BrowserTabViewItem : CHIconTabViewItem
|
@interface BrowserTabViewItem : IconTabViewItem
|
||||||
{
|
{
|
||||||
NSRect mLastDrawRect; // cached draw rect, used for dragging location
|
NSRect mLastDrawRect; // cached draw rect, used for dragging location
|
||||||
BrowserTabItemContainerView* mTabContentsView;
|
BrowserTabItemContainerView* mTabContentsView;
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
|
|
||||||
#import "BrowserWindow.h"
|
#import "BrowserWindow.h"
|
||||||
#import "BrowserWindowController.h"
|
#import "BrowserWindowController.h"
|
||||||
#import "CHAutoCompleteTextField.h"
|
#import "AutoCompleteTextField.h"
|
||||||
|
|
||||||
static const int kEscapeKeyCode = 53;
|
static const int kEscapeKeyCode = 53;
|
||||||
|
|
||||||
|
|
|
@ -36,9 +36,9 @@
|
||||||
* ***** END LICENSE BLOCK ***** */
|
* ***** END LICENSE BLOCK ***** */
|
||||||
|
|
||||||
#import <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
#import "CHBrowserWrapper.h"
|
#import "BrowserWrapper.h"
|
||||||
#import "CHFind.h"
|
#import "Find.h"
|
||||||
#import "CHBookmarksToolbar.h"
|
#import "BookmarksToolbar.h"
|
||||||
|
|
||||||
class nsIDOMEvent;
|
class nsIDOMEvent;
|
||||||
class nsIDOMNode;
|
class nsIDOMNode;
|
||||||
|
@ -76,13 +76,13 @@ class nsIDOMNode;
|
||||||
|
|
||||||
|
|
||||||
@class BookmarksDataSource;
|
@class BookmarksDataSource;
|
||||||
@class CHHistoryDataSource;
|
@class HistoryDataSource;
|
||||||
@class BrowserTabView;
|
@class BrowserTabView;
|
||||||
@class CHPageProxyIcon;
|
@class PageProxyIcon;
|
||||||
|
|
||||||
@interface BrowserWindowController : NSWindowController<CHFind>
|
@interface BrowserWindowController : NSWindowController<Find>
|
||||||
{
|
{
|
||||||
IBOutlet BrowserTabView* mTabBrowser;
|
IBOutlet BrowserTabView* mTabBrowser;
|
||||||
IBOutlet NSDrawer* mSidebarDrawer;
|
IBOutlet NSDrawer* mSidebarDrawer;
|
||||||
IBOutlet NSTabView* mSidebarTabView;
|
IBOutlet NSTabView* mSidebarTabView;
|
||||||
IBOutlet NSTabView* mSidebarSourceTabView;
|
IBOutlet NSTabView* mSidebarSourceTabView;
|
||||||
|
@ -94,13 +94,13 @@ class nsIDOMNode;
|
||||||
IBOutlet NSWindow* mLocationSheetWindow;
|
IBOutlet NSWindow* mLocationSheetWindow;
|
||||||
IBOutlet NSTextField* mLocationSheetURLField;
|
IBOutlet NSTextField* mLocationSheetURLField;
|
||||||
IBOutlet NSView* mStatusBar; // contains the status text, progress bar, and lock
|
IBOutlet NSView* mStatusBar; // contains the status text, progress bar, and lock
|
||||||
IBOutlet CHPageProxyIcon* mProxyIcon;
|
IBOutlet PageProxyIcon* mProxyIcon;
|
||||||
|
|
||||||
IBOutlet id mSidebarBrowserView; // currently unused
|
IBOutlet id mSidebarBrowserView; // currently unused
|
||||||
IBOutlet BookmarksDataSource* mSidebarBookmarksDataSource;
|
IBOutlet BookmarksDataSource* mSidebarBookmarksDataSource;
|
||||||
IBOutlet CHHistoryDataSource* mHistoryDataSource;
|
IBOutlet HistoryDataSource* mHistoryDataSource;
|
||||||
|
|
||||||
IBOutlet CHBookmarksToolbar* mPersonalToolbar;
|
IBOutlet BookmarksToolbar* mPersonalToolbar;
|
||||||
|
|
||||||
IBOutlet NSWindow* mAddBookmarkSheetWindow;
|
IBOutlet NSWindow* mAddBookmarkSheetWindow;
|
||||||
IBOutlet NSTextField* mAddBookmarkTitleField;
|
IBOutlet NSTextField* mAddBookmarkTitleField;
|
||||||
|
@ -125,7 +125,7 @@ class nsIDOMNode;
|
||||||
NSString* mPendingReferrer;
|
NSString* mPendingReferrer;
|
||||||
BOOL mPendingActivate;
|
BOOL mPendingActivate;
|
||||||
|
|
||||||
CHBrowserWrapper* mBrowserView;
|
BrowserWrapper* mBrowserView;
|
||||||
|
|
||||||
BOOL mMoveReentrant;
|
BOOL mMoveReentrant;
|
||||||
NSModalSession mModalSession;
|
NSModalSession mModalSession;
|
||||||
|
@ -160,7 +160,7 @@ class nsIDOMNode;
|
||||||
|
|
||||||
- (id)getTabBrowser;
|
- (id)getTabBrowser;
|
||||||
- (BOOL)newTabsAllowed;
|
- (BOOL)newTabsAllowed;
|
||||||
- (CHBrowserWrapper*)getBrowserWrapper;
|
- (BrowserWrapper*)getBrowserWrapper;
|
||||||
|
|
||||||
- (void)loadURL:(NSString*)aURLSpec referrer:(NSString*)aReferrer activate:(BOOL)activate;
|
- (void)loadURL:(NSString*)aURLSpec referrer:(NSString*)aReferrer activate:(BOOL)activate;
|
||||||
- (void)updateLocationFields:(NSString *)locationString;
|
- (void)updateLocationFields:(NSString *)locationString;
|
||||||
|
@ -259,7 +259,7 @@ class nsIDOMNode;
|
||||||
|
|
||||||
- (IBAction)viewOnlyThisImage:(id)aSender;
|
- (IBAction)viewOnlyThisImage:(id)aSender;
|
||||||
|
|
||||||
- (CHBookmarksToolbar*) bookmarksToolbar;
|
- (BookmarksToolbar*) bookmarksToolbar;
|
||||||
|
|
||||||
- (BOOL) isResponderGeckoView:(NSResponder*) responder;
|
- (BOOL) isResponderGeckoView:(NSResponder*) responder;
|
||||||
|
|
||||||
|
@ -279,7 +279,7 @@ class nsIDOMNode;
|
||||||
- (NSDrawer *)sidebarDrawer;
|
- (NSDrawer *)sidebarDrawer;
|
||||||
|
|
||||||
// Accessor to get the proxy icon view
|
// Accessor to get the proxy icon view
|
||||||
- (CHPageProxyIcon *)proxyIconView;
|
- (PageProxyIcon *)proxyIconView;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
|
@ -39,13 +39,13 @@
|
||||||
|
|
||||||
#import "BrowserWindowController.h"
|
#import "BrowserWindowController.h"
|
||||||
|
|
||||||
#import "CHBrowserWrapper.h"
|
#import "BrowserWrapper.h"
|
||||||
#import "CHPreferenceManager.h"
|
#import "PreferenceManager.h"
|
||||||
#import "BookmarksDataSource.h"
|
#import "BookmarksDataSource.h"
|
||||||
#import "CHHistoryDataSource.h"
|
#import "HistoryDataSource.h"
|
||||||
#import "BrowserTabView.h"
|
#import "BrowserTabView.h"
|
||||||
#import "CHUserDefaults.h"
|
#import "UserDefaults.h"
|
||||||
#import "CHPageProxyIcon.h"
|
#import "PageProxyIcon.h"
|
||||||
|
|
||||||
#include "nsIWebNavigation.h"
|
#include "nsIWebNavigation.h"
|
||||||
#include "nsIDOMElement.h"
|
#include "nsIDOMElement.h"
|
||||||
|
@ -57,10 +57,10 @@
|
||||||
#include "nsIDocShell.h"
|
#include "nsIDocShell.h"
|
||||||
#include "nsIMarkupDocumentViewer.h"
|
#include "nsIMarkupDocumentViewer.h"
|
||||||
#include "nsIContentViewer.h"
|
#include "nsIContentViewer.h"
|
||||||
#include "nsCocoaBrowserService.h"
|
#include "CHBrowserService.h"
|
||||||
#include "nsString.h"
|
#include "nsString.h"
|
||||||
#include "nsCRT.h"
|
#include "nsCRT.h"
|
||||||
#include "CHGeckoUtils.h"
|
#include "GeckoUtils.h"
|
||||||
#include "nsIWebProgressListener.h"
|
#include "nsIWebProgressListener.h"
|
||||||
#include "nsIWebBrowserChrome.h"
|
#include "nsIWebBrowserChrome.h"
|
||||||
|
|
||||||
|
@ -186,7 +186,7 @@ static NSArray* sToolbarDefaults = nil;
|
||||||
if ( (self = [super initWithWindowNibName:(NSString *)windowNibName]) ) {
|
if ( (self = [super initWithWindowNibName:(NSString *)windowNibName]) ) {
|
||||||
// this won't correctly cascade windows on multiple monitors. RADAR bug 2972893
|
// this won't correctly cascade windows on multiple monitors. RADAR bug 2972893
|
||||||
// filed since it also happens in Terminal.app
|
// filed since it also happens in Terminal.app
|
||||||
if ( nsCocoaBrowserService::sNumBrowsers == 0 )
|
if ( CHBrowserService::sNumBrowsers == 0 )
|
||||||
[self setShouldCascadeWindows:NO];
|
[self setShouldCascadeWindows:NO];
|
||||||
else
|
else
|
||||||
[self setShouldCascadeWindows:YES];
|
[self setShouldCascadeWindows:YES];
|
||||||
|
@ -725,7 +725,7 @@ static NSArray* sToolbarDefaults = nil;
|
||||||
[self manageBookmarks: self];
|
[self manageBookmarks: self];
|
||||||
|
|
||||||
// Now do the importing.
|
// 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 setFrame: NSZeroRect];
|
||||||
[newView setIsBookmarksImport: YES];
|
[newView setIsBookmarksImport: YES];
|
||||||
[[[self window] contentView] addSubview: newView];
|
[[[self window] contentView] addSubview: newView];
|
||||||
|
@ -786,7 +786,7 @@ static NSArray* sToolbarDefaults = nil;
|
||||||
|
|
||||||
// Get the users preferred search engine from IC
|
// Get the users preferred search engine from IC
|
||||||
if (!searchEngine || [searchEngine isEqualToString:@"SearchPageDefault"]) {
|
if (!searchEngine || [searchEngine isEqualToString:@"SearchPageDefault"]) {
|
||||||
searchEngine = [[CHPreferenceManager sharedInstance] getICStringPref:kICWebSearchPagePrefs];
|
searchEngine = [[PreferenceManager sharedInstance] getICStringPref:kICWebSearchPagePrefs];
|
||||||
if (!searchEngine || ([searchEngine length] == 0))
|
if (!searchEngine || ([searchEngine length] == 0))
|
||||||
searchEngine = @"http://dmoz.org/";
|
searchEngine = @"http://dmoz.org/";
|
||||||
}
|
}
|
||||||
|
@ -897,9 +897,9 @@ static NSArray* sToolbarDefaults = nil;
|
||||||
{
|
{
|
||||||
nsCOMPtr<nsIDOMElement> linkContent;
|
nsCOMPtr<nsIDOMElement> linkContent;
|
||||||
nsAutoString href;
|
nsAutoString href;
|
||||||
CHGeckoUtils::GetEnclosingLinkElementAndHref(mContextMenuNode, getter_AddRefs(linkContent), href);
|
GeckoUtils::GetEnclosingLinkElementAndHref(mContextMenuNode, getter_AddRefs(linkContent), href);
|
||||||
nsAutoString linkText;
|
nsAutoString linkText;
|
||||||
CHGeckoUtils::GatherTextUnder(linkContent, linkText);
|
GeckoUtils::GatherTextUnder(linkContent, linkText);
|
||||||
NSString* urlStr = [NSString stringWith_nsAString:href];
|
NSString* urlStr = [NSString stringWith_nsAString:href];
|
||||||
NSString* titleStr = [NSString stringWith_nsAString:linkText];
|
NSString* titleStr = [NSString stringWith_nsAString:linkText];
|
||||||
[self addBookmarkExtended:YES isFolder:NO URL:urlStr title:titleStr];
|
[self addBookmarkExtended:YES isFolder:NO URL:urlStr title:titleStr];
|
||||||
|
@ -927,7 +927,7 @@ static NSArray* sToolbarDefaults = nil;
|
||||||
|
|
||||||
- (IBAction)home:(id)aSender
|
- (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
|
- (IBAction)toggleSidebar:(id)aSender
|
||||||
|
@ -979,7 +979,7 @@ static NSArray* sToolbarDefaults = nil;
|
||||||
-(void)newTab:(BOOL)allowHomepage
|
-(void)newTab:(BOOL)allowHomepage
|
||||||
{
|
{
|
||||||
BrowserTabViewItem* newTab = [BrowserTabView makeNewTabItem];
|
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;
|
PRInt32 newTabPage = 0;
|
||||||
if (allowHomepage) {
|
if (allowHomepage) {
|
||||||
|
@ -999,7 +999,7 @@ static NSArray* sToolbarDefaults = nil;
|
||||||
newTabPage != 1 && allowHomepage);
|
newTabPage != 1 && allowHomepage);
|
||||||
|
|
||||||
if (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];
|
[mTabBrowser selectLastTabViewItem: self];
|
||||||
|
|
||||||
|
@ -1061,7 +1061,7 @@ static NSArray* sToolbarDefaults = nil;
|
||||||
return [mTabBrowser canMakeNewTabs];
|
return [mTabBrowser canMakeNewTabs];
|
||||||
}
|
}
|
||||||
|
|
||||||
-(CHBrowserWrapper*)getBrowserWrapper
|
-(BrowserWrapper*)getBrowserWrapper
|
||||||
{
|
{
|
||||||
return mBrowserView;
|
return mBrowserView;
|
||||||
}
|
}
|
||||||
|
@ -1111,7 +1111,7 @@ static NSArray* sToolbarDefaults = nil;
|
||||||
[mTabBrowser addTabViewItem: newTab];
|
[mTabBrowser addTabViewItem: newTab];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
CHBrowserWrapper* newView = [[[CHBrowserWrapper alloc] initWithTab: newTab andWindow: [mTabBrowser window]] autorelease];
|
BrowserWrapper* newView = [[[BrowserWrapper alloc] initWithTab: newTab andWindow: [mTabBrowser window]] autorelease];
|
||||||
[newView setTab: newTab];
|
[newView setTab: newTab];
|
||||||
|
|
||||||
[newTab setLabel: NSLocalizedString(@"TabLoading", @"")];
|
[newTab setLabel: NSLocalizedString(@"TabLoading", @"")];
|
||||||
|
@ -1125,16 +1125,16 @@ static NSArray* sToolbarDefaults = nil;
|
||||||
|
|
||||||
-(void)setupSidebarTabs
|
-(void)setupSidebarTabs
|
||||||
{
|
{
|
||||||
CHIconTabViewItem *bookItem = [[CHIconTabViewItem alloc] initWithIdentifier:@"bookmarkSidebarCHIconTabViewItem"
|
IconTabViewItem *bookItem = [[IconTabViewItem alloc] initWithIdentifier:@"bookmarkSidebarCHIconTabViewItem"
|
||||||
withTabIcon:[NSImage imageNamed:@"bookicon"]];
|
withTabIcon:[NSImage imageNamed:@"bookicon"]];
|
||||||
CHIconTabViewItem *histItem = [[CHIconTabViewItem alloc] initWithIdentifier:@"historySidebarCHIconTabViewItem"
|
IconTabViewItem *histItem = [[IconTabViewItem alloc] initWithIdentifier:@"historySidebarCHIconTabViewItem"
|
||||||
withTabIcon:[NSImage imageNamed:@"historyicon"]];
|
withTabIcon:[NSImage imageNamed:@"historyicon"]];
|
||||||
#if USE_SEARCH_ITEM
|
#if USE_SEARCH_ITEM
|
||||||
CHIconTabViewItem *searchItem = [[CHIconTabViewItem alloc] initWithIdentifier:@"searchSidebarCHIconTabViewItem"
|
IconTabViewItem *searchItem = [[IconTabViewItem alloc] initWithIdentifier:@"searchSidebarCHIconTabViewItem"
|
||||||
withTabIcon:[NSImage imageNamed:@"searchicon"]];
|
withTabIcon:[NSImage imageNamed:@"searchicon"]];
|
||||||
#endif
|
#endif
|
||||||
#if USE_PANELS_ITEM
|
#if USE_PANELS_ITEM
|
||||||
CHIconTabViewItem *panelsItem = [[CHIconTabViewItem alloc] initWithIdentifier:@"myPanelsCHIconTabViewItem"
|
IconTabViewItem *panelsItem = [[IconTabViewItem alloc] initWithIdentifier:@"myPanelsCHIconTabViewItem"
|
||||||
withTabIcon:[NSImage imageNamed:@"panel_icon"]];
|
withTabIcon:[NSImage imageNamed:@"panel_icon"]];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1327,7 +1327,7 @@ static NSArray* sToolbarDefaults = nil;
|
||||||
{
|
{
|
||||||
nsCOMPtr<nsIDOMElement> linkContent;
|
nsCOMPtr<nsIDOMElement> linkContent;
|
||||||
nsAutoString href;
|
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
|
// XXXdwh Handle simple XLINKs if we want to be compatible with Mozilla, but who
|
||||||
// really uses these anyway? :)
|
// really uses these anyway? :)
|
||||||
|
@ -1360,7 +1360,7 @@ static NSArray* sToolbarDefaults = nil;
|
||||||
{
|
{
|
||||||
nsCOMPtr<nsIDOMElement> linkContent;
|
nsCOMPtr<nsIDOMElement> linkContent;
|
||||||
nsAutoString href;
|
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
|
// XXXdwh Handle simple XLINKs if we want to be compatible with Mozilla, but who
|
||||||
// really uses these anyway? :)
|
// really uses these anyway? :)
|
||||||
|
@ -1371,7 +1371,7 @@ static NSArray* sToolbarDefaults = nil;
|
||||||
|
|
||||||
// The user wants to save this link.
|
// The user wants to save this link.
|
||||||
nsAutoString text;
|
nsAutoString text;
|
||||||
CHGeckoUtils::GatherTextUnder(mContextMenuNode, text);
|
GeckoUtils::GatherTextUnder(mContextMenuNode, text);
|
||||||
|
|
||||||
[self saveURL: nil filterList: nil
|
[self saveURL: nil filterList: nil
|
||||||
url: hrefStr suggestedFilename: [NSString stringWith_nsAString: text]];
|
url: hrefStr suggestedFilename: [NSString stringWith_nsAString: text]];
|
||||||
|
@ -1422,7 +1422,7 @@ static NSArray* sToolbarDefaults = nil;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (CHBookmarksToolbar*) bookmarksToolbar
|
- (BookmarksToolbar*) bookmarksToolbar
|
||||||
{
|
{
|
||||||
return mPersonalToolbar;
|
return mPersonalToolbar;
|
||||||
}
|
}
|
||||||
|
@ -1486,7 +1486,7 @@ static NSArray* sToolbarDefaults = nil;
|
||||||
return mSidebarDrawer;
|
return mSidebarDrawer;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (CHPageProxyIcon *)proxyIconView
|
- (PageProxyIcon *)proxyIconView
|
||||||
{
|
{
|
||||||
return mProxyIcon;
|
return mProxyIcon;
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
@class BrowserWindowController;
|
@class BrowserWindowController;
|
||||||
@class ToolTip;
|
@class ToolTip;
|
||||||
|
|
||||||
@interface CHBrowserWrapper : NSView <NSBrowserListener, NSBrowserContainer>
|
@interface BrowserWrapper : NSView <NSBrowserListener, NSBrowserContainer>
|
||||||
{
|
{
|
||||||
NSTextField* mUrlbar;
|
NSTextField* mUrlbar;
|
||||||
NSTextField* mStatus;
|
NSTextField* mStatus;
|
||||||
|
|
|
@ -37,14 +37,14 @@
|
||||||
|
|
||||||
#import "NSString+Utils.h"
|
#import "NSString+Utils.h"
|
||||||
|
|
||||||
#import "CHPreferenceManager.h"
|
#import "PreferenceManager.h"
|
||||||
#import "CHBrowserWrapper.h"
|
#import "BrowserWrapper.h"
|
||||||
#import "BrowserWindowController.h"
|
#import "BrowserWindowController.h"
|
||||||
#import "BookmarksService.h"
|
#import "BookmarksService.h"
|
||||||
#import "SiteIconProvider.h"
|
#import "SiteIconProvider.h"
|
||||||
#import "BrowserTabViewItem.h"
|
#import "BrowserTabViewItem.h"
|
||||||
#import "ToolTip.h"
|
#import "ToolTip.h"
|
||||||
#import "CHPageProxyIcon.h"
|
#import "PageProxyIcon.h"
|
||||||
|
|
||||||
#include "nsCOMPtr.h"
|
#include "nsCOMPtr.h"
|
||||||
#include "nsIServiceManager.h"
|
#include "nsIServiceManager.h"
|
||||||
|
@ -59,7 +59,7 @@
|
||||||
#include "nsIDOMEventReceiver.h"
|
#include "nsIDOMEventReceiver.h"
|
||||||
#include "nsIPrefBranch.h"
|
#include "nsIPrefBranch.h"
|
||||||
#include "nsIPrefService.h"
|
#include "nsIPrefService.h"
|
||||||
#include "nsCocoaBrowserService.h"
|
#include "CHBrowserService.h"
|
||||||
#include "nsIWebProgressListener.h"
|
#include "nsIWebProgressListener.h"
|
||||||
|
|
||||||
#include <QuickDraw.h>
|
#include <QuickDraw.h>
|
||||||
|
@ -70,7 +70,7 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
|
||||||
|
|
||||||
const NSString* kOfflineNotificationName = @"offlineModeChanged";
|
const NSString* kOfflineNotificationName = @"offlineModeChanged";
|
||||||
|
|
||||||
@interface CHBrowserWrapper(Private)
|
@interface BrowserWrapper(Private)
|
||||||
|
|
||||||
- (void)setPendingActive:(BOOL)active;
|
- (void)setPendingActive:(BOOL)active;
|
||||||
- (void)registerNotificationListener;
|
- (void)registerNotificationListener;
|
||||||
|
@ -82,7 +82,7 @@ const NSString* kOfflineNotificationName = @"offlineModeChanged";
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation CHBrowserWrapper
|
@implementation BrowserWrapper
|
||||||
|
|
||||||
- (id)initWithTab:(NSTabViewItem*)aTab andWindow:(NSWindow*)aWindow
|
- (id)initWithTab:(NSTabViewItem*)aTab andWindow:(NSWindow*)aWindow
|
||||||
{
|
{
|
||||||
|
@ -340,7 +340,7 @@ const NSString* kOfflineNotificationName = @"offlineModeChanged";
|
||||||
|
|
||||||
- (void)onLocationChange:(NSString*)urlSpec
|
- (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;
|
BOOL siteIconLoadInitiated = NO;
|
||||||
|
|
||||||
SiteIconProvider* faviconProvider = [SiteIconProvider sharedFavoriteIconProvider];
|
SiteIconProvider* faviconProvider = [SiteIconProvider sharedFavoriteIconProvider];
|
||||||
|
@ -573,7 +573,7 @@ const NSString* kOfflineNotificationName = @"offlineModeChanged";
|
||||||
if (isUnrequested) {
|
if (isUnrequested) {
|
||||||
// A popup is being opened while the page is currently loading. Offer to block the
|
// A popup is being opened while the page is currently loading. Offer to block the
|
||||||
// popup.
|
// popup.
|
||||||
nsAlertController* controller = nsCocoaBrowserService::GetAlertController();
|
nsAlertController* controller = CHBrowserService::GetAlertController();
|
||||||
BOOL confirm = [controller confirm: [self window] title: @"Unrequested Popup Detected"
|
BOOL confirm = [controller confirm: [self window] title: @"Unrequested Popup Detected"
|
||||||
text: [NSString stringWithFormat: NSLocalizedString(@"PopupBlockMsg", @""), NSLocalizedStringFromTable(@"CFBundleName", @"InfoPlist", nil)]];
|
text: [NSString stringWithFormat: NSLocalizedString(@"PopupBlockMsg", @""), NSLocalizedStringFromTable(@"CFBundleName", @"InfoPlist", nil)]];
|
||||||
|
|
||||||
|
@ -680,7 +680,7 @@ const NSString* kOfflineNotificationName = @"offlineModeChanged";
|
||||||
NSImage* iconImage = [userInfo objectForKey:SiteIconLoadImageKey];
|
NSImage* iconImage = [userInfo objectForKey:SiteIconLoadImageKey];
|
||||||
NSString* siteIconURI = [userInfo objectForKey:SiteIconLoadURIKey];
|
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)
|
if (iconImage == nil)
|
||||||
siteIconURI = @""; // go back to default image
|
siteIconURI = @""; // go back to default image
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
|
|
||||||
#import "NSString+Utils.h"
|
#import "NSString+Utils.h"
|
||||||
|
|
||||||
#import "nsCocoaBrowserService.h"
|
#import "CHBrowserService.h"
|
||||||
#import "CocoaPromptService.h"
|
#import "CocoaPromptService.h"
|
||||||
|
|
||||||
#include "nsCRT.h"
|
#include "nsCRT.h"
|
||||||
|
@ -65,7 +65,7 @@ CocoaPromptService::Alert(nsIDOMWindow *parent,
|
||||||
const PRUnichar *dialogTitle,
|
const PRUnichar *dialogTitle,
|
||||||
const PRUnichar *text)
|
const PRUnichar *text)
|
||||||
{
|
{
|
||||||
nsAlertController* controller = nsCocoaBrowserService::GetAlertController();
|
nsAlertController* controller = CHBrowserService::GetAlertController();
|
||||||
if (!controller) {
|
if (!controller) {
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
}
|
}
|
||||||
|
@ -89,7 +89,7 @@ CocoaPromptService::AlertCheck(nsIDOMWindow *parent,
|
||||||
const PRUnichar *checkMsg,
|
const PRUnichar *checkMsg,
|
||||||
PRBool *checkValue)
|
PRBool *checkValue)
|
||||||
{
|
{
|
||||||
nsAlertController* controller = nsCocoaBrowserService::GetAlertController();
|
nsAlertController* controller = CHBrowserService::GetAlertController();
|
||||||
if (!controller) {
|
if (!controller) {
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
}
|
}
|
||||||
|
@ -120,7 +120,7 @@ CocoaPromptService::Confirm(nsIDOMWindow *parent,
|
||||||
const PRUnichar *text,
|
const PRUnichar *text,
|
||||||
PRBool *_retval)
|
PRBool *_retval)
|
||||||
{
|
{
|
||||||
nsAlertController* controller = nsCocoaBrowserService::GetAlertController();
|
nsAlertController* controller = CHBrowserService::GetAlertController();
|
||||||
if (!controller) {
|
if (!controller) {
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
}
|
}
|
||||||
|
@ -142,7 +142,7 @@ CocoaPromptService::ConfirmCheck(nsIDOMWindow *parent,
|
||||||
const PRUnichar *checkMsg,
|
const PRUnichar *checkMsg,
|
||||||
PRBool *checkValue, PRBool *_retval)
|
PRBool *checkValue, PRBool *_retval)
|
||||||
{
|
{
|
||||||
nsAlertController* controller = nsCocoaBrowserService::GetAlertController();
|
nsAlertController* controller = CHBrowserService::GetAlertController();
|
||||||
if (!controller) {
|
if (!controller) {
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
}
|
}
|
||||||
|
@ -185,7 +185,7 @@ CocoaPromptService::ConfirmEx(nsIDOMWindow *parent,
|
||||||
const PRUnichar *checkMsg,
|
const PRUnichar *checkMsg,
|
||||||
PRBool *checkValue, PRInt32 *buttonPressed)
|
PRBool *checkValue, PRInt32 *buttonPressed)
|
||||||
{
|
{
|
||||||
nsAlertController* controller = nsCocoaBrowserService::GetAlertController();
|
nsAlertController* controller = CHBrowserService::GetAlertController();
|
||||||
if (!controller) {
|
if (!controller) {
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
}
|
}
|
||||||
|
@ -228,7 +228,7 @@ CocoaPromptService::Prompt(nsIDOMWindow *parent,
|
||||||
PRBool *checkValue,
|
PRBool *checkValue,
|
||||||
PRBool *_retval)
|
PRBool *_retval)
|
||||||
{
|
{
|
||||||
nsAlertController* controller = nsCocoaBrowserService::GetAlertController();
|
nsAlertController* controller = CHBrowserService::GetAlertController();
|
||||||
if (!controller) {
|
if (!controller) {
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
}
|
}
|
||||||
|
@ -270,7 +270,7 @@ CocoaPromptService::PromptUsernameAndPassword(nsIDOMWindow *parent,
|
||||||
PRBool *checkValue,
|
PRBool *checkValue,
|
||||||
PRBool *_retval)
|
PRBool *_retval)
|
||||||
{
|
{
|
||||||
nsAlertController* controller = nsCocoaBrowserService::GetAlertController();
|
nsAlertController* controller = CHBrowserService::GetAlertController();
|
||||||
if (!controller) {
|
if (!controller) {
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
}
|
}
|
||||||
|
@ -318,7 +318,7 @@ CocoaPromptService::PromptPassword(nsIDOMWindow *parent,
|
||||||
PRBool *checkValue,
|
PRBool *checkValue,
|
||||||
PRBool *_retval)
|
PRBool *_retval)
|
||||||
{
|
{
|
||||||
nsAlertController* controller = nsCocoaBrowserService::GetAlertController();
|
nsAlertController* controller = CHBrowserService::GetAlertController();
|
||||||
if (!controller) {
|
if (!controller) {
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,7 +69,7 @@
|
||||||
#include "nsNetUtil.h"
|
#include "nsNetUtil.h"
|
||||||
|
|
||||||
// Common helper routines (also used by the context menu code)
|
// Common helper routines (also used by the context menu code)
|
||||||
#include "CHGeckoUtils.h"
|
#include "GeckoUtils.h"
|
||||||
|
|
||||||
#import "CHBrowserView.h"
|
#import "CHBrowserView.h"
|
||||||
|
|
||||||
|
@ -261,7 +261,7 @@ ContentClickListener::MouseClick(nsIDOMEvent* aEvent)
|
||||||
|
|
||||||
nsCOMPtr<nsIDOMElement> linkContent;
|
nsCOMPtr<nsIDOMElement> linkContent;
|
||||||
nsAutoString href;
|
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
|
// XXXdwh Handle simple XLINKs if we want to be compatible with Mozilla, but who
|
||||||
// really uses these anyway? :)
|
// really uses these anyway? :)
|
||||||
|
@ -301,7 +301,7 @@ ContentClickListener::MouseClick(nsIDOMEvent* aEvent)
|
||||||
else if (altKey) {
|
else if (altKey) {
|
||||||
// The user wants to save this link.
|
// The user wants to save this link.
|
||||||
nsAutoString text;
|
nsAutoString text;
|
||||||
CHGeckoUtils::GatherTextUnder(content, text);
|
GeckoUtils::GatherTextUnder(content, text);
|
||||||
|
|
||||||
[mBrowserController saveURL: nil filterList: nil
|
[mBrowserController saveURL: nil filterList: nil
|
||||||
url: hrefStr suggestedFilename: [NSString stringWith_nsAString: text]];
|
url: hrefStr suggestedFilename: [NSString stringWith_nsAString: text]];
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
#import <Appkit/Appkit.h>
|
#import <Appkit/Appkit.h>
|
||||||
|
|
||||||
@interface CHGoMenu : NSMenu {
|
@interface GoMenu : NSMenu {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,10 +23,10 @@
|
||||||
|
|
||||||
#import "NSString+Utils.h"
|
#import "NSString+Utils.h"
|
||||||
|
|
||||||
#import "CHGoMenu.h"
|
#import "GoMenu.h"
|
||||||
#import "MainController.h"
|
#import "MainController.h"
|
||||||
#import "BrowserWindowController.h"
|
#import "BrowserWindowController.h"
|
||||||
#import "CHBrowserWrapper.h"
|
#import "BrowserWrapper.h"
|
||||||
#import "CHBrowserView.h"
|
#import "CHBrowserView.h"
|
||||||
#include "nsCOMPtr.h"
|
#include "nsCOMPtr.h"
|
||||||
#include "nsString.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
|
// the maximum number of characters in a menu title before cropping it
|
||||||
static const unsigned int kMaxTitleLength = 80;
|
static const unsigned int kMaxTitleLength = 80;
|
||||||
|
|
||||||
@implementation CHGoMenu
|
@implementation GoMenu
|
||||||
|
|
||||||
- (void) update
|
- (void) update
|
||||||
{
|
{
|
||||||
|
@ -60,7 +60,7 @@ static const unsigned int kMaxTitleLength = 80;
|
||||||
if (!controller) return nsnull;
|
if (!controller) return nsnull;
|
||||||
|
|
||||||
// get web navigation for current browser
|
// get web navigation for current browser
|
||||||
CHBrowserWrapper* wrapper = [controller getBrowserWrapper];
|
BrowserWrapper* wrapper = [controller getBrowserWrapper];
|
||||||
if (!wrapper) return nsnull;
|
if (!wrapper) return nsnull;
|
||||||
CHBrowserView* view = [wrapper getBrowserView];
|
CHBrowserView* view = [wrapper getBrowserView];
|
||||||
if (!view) return nsnull;
|
if (!view) return nsnull;
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
#import <AppKit/AppKit.h>
|
#import <AppKit/AppKit.h>
|
||||||
|
|
||||||
@interface CHLocationBar : NSView {
|
@interface LocationBar : NSView {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,9 +36,9 @@
|
||||||
*
|
*
|
||||||
* ***** END LICENSE BLOCK ***** */
|
* ***** END LICENSE BLOCK ***** */
|
||||||
|
|
||||||
#import "CHLocationBar.h"
|
#import "LocationBar.h"
|
||||||
|
|
||||||
@implementation CHLocationBar
|
@implementation LocationBar
|
||||||
|
|
||||||
- (void)drawRect:(NSRect)aRect {
|
- (void)drawRect:(NSRect)aRect {
|
||||||
// Frame the border.
|
// Frame the border.
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
#import <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
|
|
||||||
@interface CHPageProxyIcon : NSImageView
|
@interface PageProxyIcon : NSImageView
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
#import "NSString+Utils.h"
|
#import "NSString+Utils.h"
|
||||||
|
|
||||||
#import "CHPageProxyIcon.h"
|
#import "PageProxyIcon.h"
|
||||||
|
|
||||||
#import "BookmarksService.h"
|
#import "BookmarksService.h"
|
||||||
#import "MainController.h"
|
#import "MainController.h"
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
#include "nsNetUtil.h"
|
#include "nsNetUtil.h"
|
||||||
#include "nsString.h"
|
#include "nsString.h"
|
||||||
|
|
||||||
@implementation CHPageProxyIcon
|
@implementation PageProxyIcon
|
||||||
|
|
||||||
- (void)awakeFromNib
|
- (void)awakeFromNib
|
||||||
{
|
{
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
* ***** END LICENSE BLOCK ***** */
|
* ***** END LICENSE BLOCK ***** */
|
||||||
|
|
||||||
#import "nsAlertController.h"
|
#import "nsAlertController.h"
|
||||||
#import "nsCocoaBrowserService.h"
|
#import "CHBrowserService.h"
|
||||||
#import "SecurityDialogs.h"
|
#import "SecurityDialogs.h"
|
||||||
#import "MainController.h"
|
#import "MainController.h"
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ SecurityDialogs::UnknownIssuer(nsITransportSecurityInfo *socketInfo,
|
||||||
*_retval = PR_TRUE;
|
*_retval = PR_TRUE;
|
||||||
*outAddType = ADD_TRUSTED_FOR_SESSION;
|
*outAddType = ADD_TRUSTED_FOR_SESSION;
|
||||||
|
|
||||||
nsAlertController* controller = nsCocoaBrowserService::GetAlertController();
|
nsAlertController* controller = CHBrowserService::GetAlertController();
|
||||||
if (!controller)
|
if (!controller)
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@ SecurityDialogs::MismatchDomain(nsITransportSecurityInfo *socketInfo,
|
||||||
const PRUnichar *targetURL,
|
const PRUnichar *targetURL,
|
||||||
nsIX509Cert *cert, PRBool *_retval)
|
nsIX509Cert *cert, PRBool *_retval)
|
||||||
{
|
{
|
||||||
nsAlertController* controller = nsCocoaBrowserService::GetAlertController();
|
nsAlertController* controller = CHBrowserService::GetAlertController();
|
||||||
if (!controller)
|
if (!controller)
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
|
|
||||||
|
@ -118,7 +118,7 @@ NS_IMETHODIMP
|
||||||
SecurityDialogs::CertExpired(nsITransportSecurityInfo *socketInfo,
|
SecurityDialogs::CertExpired(nsITransportSecurityInfo *socketInfo,
|
||||||
nsIX509Cert *cert, PRBool *_retval)
|
nsIX509Cert *cert, PRBool *_retval)
|
||||||
{
|
{
|
||||||
nsAlertController* controller = nsCocoaBrowserService::GetAlertController();
|
nsAlertController* controller = CHBrowserService::GetAlertController();
|
||||||
if (!controller)
|
if (!controller)
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
|
|
||||||
|
@ -199,7 +199,7 @@ NS_IMETHODIMP
|
||||||
SecurityDialogs::ConfirmPostToInsecureFromSecure(nsIInterfaceRequestor *ctx,
|
SecurityDialogs::ConfirmPostToInsecureFromSecure(nsIInterfaceRequestor *ctx,
|
||||||
PRBool* _result)
|
PRBool* _result)
|
||||||
{
|
{
|
||||||
nsAlertController* controller = nsCocoaBrowserService::GetAlertController();
|
nsAlertController* controller = CHBrowserService::GetAlertController();
|
||||||
if (!controller)
|
if (!controller)
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
* ***** END LICENSE BLOCK ***** */
|
* ***** END LICENSE BLOCK ***** */
|
||||||
|
|
||||||
#import "nsAlertController.h"
|
#import "nsAlertController.h"
|
||||||
#import "nsCocoaBrowserService.h"
|
#import "CHBrowserService.h"
|
||||||
|
|
||||||
#include "nsIBadCertListener.h"
|
#include "nsIBadCertListener.h"
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ enum { kOKButton = 0, kCancelButton = 1, kOtherButton = 2 };
|
||||||
|
|
||||||
- (void)awakeFromNib
|
- (void)awakeFromNib
|
||||||
{
|
{
|
||||||
nsCocoaBrowserService::SetAlertController(self);
|
CHBrowserService::SetAlertController(self);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)alert:(NSWindow*)parent title:(NSString*)title text:(NSString*)text
|
- (void)alert:(NSWindow*)parent title:(NSString*)title text:(NSString*)text
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
|
|
||||||
#import <AppKit/AppKit.h>
|
#import <AppKit/AppKit.h>
|
||||||
|
|
||||||
#import "DownloadProgressDisplay.h"
|
#import "CHDownloadProgressDisplay.h"
|
||||||
|
|
||||||
#include "nscore.h"
|
#include "nscore.h"
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ class nsDownloadListener;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
||||||
@interface ProgressDlgController : NSWindowController <DownloadProgressDisplay>
|
@interface ProgressDlgController : NSWindowController <CHDownloadProgressDisplay>
|
||||||
{
|
{
|
||||||
IBOutlet NSTextField *mElapsedTimeLabel;
|
IBOutlet NSTextField *mElapsedTimeLabel;
|
||||||
IBOutlet NSTextField *mFromField;
|
IBOutlet NSTextField *mFromField;
|
||||||
|
|
|
@ -60,11 +60,11 @@ static NSString *ProgressWindowFrameSaveName = @"ProgressWindow";
|
||||||
|
|
||||||
@implementation ChimeraDownloadControllerFactory : DownloadControllerFactory
|
@implementation ChimeraDownloadControllerFactory : DownloadControllerFactory
|
||||||
|
|
||||||
- (NSWindowController<DownloadProgressDisplay> *)createDownloadController
|
- (NSWindowController<CHDownloadProgressDisplay> *)createDownloadController
|
||||||
{
|
{
|
||||||
NSWindowController* progressController = [[ProgressDlgController alloc] initWithWindowNibName: @"ProgressDialog"];
|
NSWindowController* progressController = [[ProgressDlgController alloc] initWithWindowNibName: @"ProgressDialog"];
|
||||||
NSAssert([progressController conformsToProtocol:@protocol(DownloadProgressDisplay)],
|
NSAssert([progressController conformsToProtocol:@protocol(CHDownloadProgressDisplay)],
|
||||||
@"progressController should conform to DownloadProgressDisplay protocol");
|
@"progressController should conform to CHDownloadProgressDisplay protocol");
|
||||||
return progressController;
|
return progressController;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -434,7 +434,7 @@ static NSString *ProgressWindowFrameSaveName = @"ProgressWindow";
|
||||||
|
|
||||||
#pragma mark -
|
#pragma mark -
|
||||||
|
|
||||||
// DownloadProgressDisplay protocol methods
|
// CHDownloadProgressDisplay protocol methods
|
||||||
|
|
||||||
- (void)onStartDownload:(BOOL)isFileSave;
|
- (void)onStartDownload:(BOOL)isFileSave;
|
||||||
{
|
{
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
#import <Foundation/Foundation.h>
|
#import <Foundation/Foundation.h>
|
||||||
#import <Appkit/Appkit.h>
|
#import <Appkit/Appkit.h>
|
||||||
|
|
||||||
#import "DownloadProgressDisplay.h"
|
#import "CHDownloadProgressDisplay.h"
|
||||||
|
|
||||||
#include "nsString.h"
|
#include "nsString.h"
|
||||||
#include "nsIDownload.h"
|
#include "nsIDownload.h"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
//
|
//
|
||||||
// nsCocoaBrowserListener.h
|
// CHBrowserListener.h
|
||||||
// Chimera
|
// Chimera
|
||||||
//
|
//
|
||||||
// Created by Simon Fraser on Sat Aug 17 2002.
|
// Created by Simon Fraser on Sat Aug 17 2002.
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
@class CHBrowserView;
|
@class CHBrowserView;
|
||||||
|
|
||||||
class nsCocoaBrowserListener : public nsSupportsWeakReference,
|
class CHBrowserListener : public nsSupportsWeakReference,
|
||||||
public nsIInterfaceRequestor,
|
public nsIInterfaceRequestor,
|
||||||
public nsIWebBrowserChrome,
|
public nsIWebBrowserChrome,
|
||||||
public nsIWindowCreator,
|
public nsIWindowCreator,
|
||||||
|
@ -33,8 +33,8 @@ class nsCocoaBrowserListener : public nsSupportsWeakReference,
|
||||||
public nsITooltipListener
|
public nsITooltipListener
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
nsCocoaBrowserListener(CHBrowserView* aView);
|
CHBrowserListener(CHBrowserView* aView);
|
||||||
virtual ~nsCocoaBrowserListener();
|
virtual ~CHBrowserListener();
|
||||||
|
|
||||||
NS_DECL_ISUPPORTS
|
NS_DECL_ISUPPORTS
|
||||||
NS_DECL_NSIINTERFACEREQUESTOR
|
NS_DECL_NSIINTERFACEREQUESTOR
|
||||||
|
|
|
@ -53,17 +53,17 @@
|
||||||
|
|
||||||
#import "CHBrowserView.h"
|
#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)
|
: mView(aView), mContainer(nsnull), mIsModal(PR_FALSE), mChromeFlags(0)
|
||||||
{
|
{
|
||||||
NS_INIT_ISUPPORTS();
|
NS_INIT_ISUPPORTS();
|
||||||
mListeners = [[NSMutableArray alloc] init];
|
mListeners = [[NSMutableArray alloc] init];
|
||||||
}
|
}
|
||||||
|
|
||||||
nsCocoaBrowserListener::~nsCocoaBrowserListener()
|
CHBrowserListener::~CHBrowserListener()
|
||||||
{
|
{
|
||||||
[mListeners release];
|
[mListeners release];
|
||||||
mView = nsnull;
|
mView = nsnull;
|
||||||
|
@ -72,7 +72,7 @@ nsCocoaBrowserListener::~nsCocoaBrowserListener()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMPL_ISUPPORTS9(nsCocoaBrowserListener,
|
NS_IMPL_ISUPPORTS9(CHBrowserListener,
|
||||||
nsIInterfaceRequestor,
|
nsIInterfaceRequestor,
|
||||||
nsIWebBrowserChrome,
|
nsIWebBrowserChrome,
|
||||||
nsIWindowCreator,
|
nsIWindowCreator,
|
||||||
|
@ -85,7 +85,7 @@ NS_IMPL_ISUPPORTS9(nsCocoaBrowserListener,
|
||||||
|
|
||||||
// Implementation of nsIInterfaceRequestor
|
// Implementation of nsIInterfaceRequestor
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsCocoaBrowserListener::GetInterface(const nsIID &aIID, void** aInstancePtr)
|
CHBrowserListener::GetInterface(const nsIID &aIID, void** aInstancePtr)
|
||||||
{
|
{
|
||||||
if (aIID.Equals(NS_GET_IID(nsIDOMWindow))) {
|
if (aIID.Equals(NS_GET_IID(nsIDOMWindow))) {
|
||||||
nsCOMPtr<nsIWebBrowser> browser = dont_AddRef([mView getWebBrowser]);
|
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.
|
// for a new window that have a parent to us, and we take over from there.
|
||||||
/* nsIWebBrowserChrome createChromeWindow (in nsIWebBrowserChrome parent, in PRUint32 chromeFlags); */
|
/* nsIWebBrowserChrome createChromeWindow (in nsIWebBrowserChrome parent, in PRUint32 chromeFlags); */
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsCocoaBrowserListener::CreateChromeWindow(nsIWebBrowserChrome *parent,
|
CHBrowserListener::CreateChromeWindow(nsIWebBrowserChrome *parent,
|
||||||
PRUint32 chromeFlags,
|
PRUint32 chromeFlags,
|
||||||
nsIWebBrowserChrome **_retval)
|
nsIWebBrowserChrome **_retval)
|
||||||
{
|
{
|
||||||
if (parent != this) {
|
if (parent != this) {
|
||||||
#if DEBUG
|
#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
|
#endif
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
}
|
}
|
||||||
|
@ -119,7 +119,7 @@ nsCocoaBrowserListener::CreateChromeWindow(nsIWebBrowserChrome *parent,
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsCocoaBrowserListener* listener = [childView getCocoaBrowserListener];
|
CHBrowserListener* listener = [childView getCocoaBrowserListener];
|
||||||
if (!listener) {
|
if (!listener) {
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
NSLog(@"Uh-oh! No listener yet for a newly created window (nsCocoaBrowserlistener)");
|
NSLog(@"Uh-oh! No listener yet for a newly created window (nsCocoaBrowserlistener)");
|
||||||
|
@ -138,7 +138,7 @@ nsCocoaBrowserListener::CreateChromeWindow(nsIWebBrowserChrome *parent,
|
||||||
|
|
||||||
// Implementation of nsIContextMenuListener
|
// Implementation of nsIContextMenuListener
|
||||||
NS_IMETHODIMP
|
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];
|
[mContainer onShowContextMenu: aContextFlags domEvent: aEvent domNode: aNode];
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
@ -146,7 +146,7 @@ nsCocoaBrowserListener::OnShowContextMenu(PRUint32 aContextFlags, nsIDOMEvent* a
|
||||||
|
|
||||||
// Implementation of nsITooltipListener
|
// Implementation of nsITooltipListener
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsCocoaBrowserListener::OnShowTooltip(PRInt32 aXCoords, PRInt32 aYCoords, const PRUnichar *aTipText)
|
CHBrowserListener::OnShowTooltip(PRInt32 aXCoords, PRInt32 aYCoords, const PRUnichar *aTipText)
|
||||||
{
|
{
|
||||||
NSPoint where;
|
NSPoint where;
|
||||||
where.x = aXCoords; where.y = aYCoords;
|
where.x = aXCoords; where.y = aYCoords;
|
||||||
|
@ -155,7 +155,7 @@ nsCocoaBrowserListener::OnShowTooltip(PRInt32 aXCoords, PRInt32 aYCoords, const
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsCocoaBrowserListener::OnHideTooltip()
|
CHBrowserListener::OnHideTooltip()
|
||||||
{
|
{
|
||||||
[mContainer onHideTooltip];
|
[mContainer onHideTooltip];
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
@ -164,7 +164,7 @@ nsCocoaBrowserListener::OnHideTooltip()
|
||||||
// Implementation of nsIWebBrowserChrome
|
// Implementation of nsIWebBrowserChrome
|
||||||
/* void setStatus (in unsigned long statusType, in wstring status); */
|
/* void setStatus (in unsigned long statusType, in wstring status); */
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsCocoaBrowserListener::SetStatus(PRUint32 statusType, const PRUnichar *status)
|
CHBrowserListener::SetStatus(PRUint32 statusType, const PRUnichar *status)
|
||||||
{
|
{
|
||||||
if (!mContainer) {
|
if (!mContainer) {
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
|
@ -182,7 +182,7 @@ nsCocoaBrowserListener::SetStatus(PRUint32 statusType, const PRUnichar *status)
|
||||||
|
|
||||||
/* attribute nsIWebBrowser webBrowser; */
|
/* attribute nsIWebBrowser webBrowser; */
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsCocoaBrowserListener::GetWebBrowser(nsIWebBrowser * *aWebBrowser)
|
CHBrowserListener::GetWebBrowser(nsIWebBrowser * *aWebBrowser)
|
||||||
{
|
{
|
||||||
NS_ENSURE_ARG_POINTER(aWebBrowser);
|
NS_ENSURE_ARG_POINTER(aWebBrowser);
|
||||||
if (!mView) {
|
if (!mView) {
|
||||||
|
@ -193,7 +193,7 @@ nsCocoaBrowserListener::GetWebBrowser(nsIWebBrowser * *aWebBrowser)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsCocoaBrowserListener::SetWebBrowser(nsIWebBrowser * aWebBrowser)
|
CHBrowserListener::SetWebBrowser(nsIWebBrowser * aWebBrowser)
|
||||||
{
|
{
|
||||||
if (!mView) {
|
if (!mView) {
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
|
@ -206,14 +206,14 @@ nsCocoaBrowserListener::SetWebBrowser(nsIWebBrowser * aWebBrowser)
|
||||||
|
|
||||||
/* attribute unsigned long chromeFlags; */
|
/* attribute unsigned long chromeFlags; */
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsCocoaBrowserListener::GetChromeFlags(PRUint32 *aChromeFlags)
|
CHBrowserListener::GetChromeFlags(PRUint32 *aChromeFlags)
|
||||||
{
|
{
|
||||||
NS_ENSURE_ARG_POINTER(aChromeFlags);
|
NS_ENSURE_ARG_POINTER(aChromeFlags);
|
||||||
*aChromeFlags = mChromeFlags;
|
*aChromeFlags = mChromeFlags;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsCocoaBrowserListener::SetChromeFlags(PRUint32 aChromeFlags)
|
CHBrowserListener::SetChromeFlags(PRUint32 aChromeFlags)
|
||||||
{
|
{
|
||||||
// XXX Do nothing with them for now
|
// XXX Do nothing with them for now
|
||||||
mChromeFlags = aChromeFlags;
|
mChromeFlags = aChromeFlags;
|
||||||
|
@ -222,7 +222,7 @@ nsCocoaBrowserListener::SetChromeFlags(PRUint32 aChromeFlags)
|
||||||
|
|
||||||
/* void destroyBrowserWindow (); */
|
/* void destroyBrowserWindow (); */
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsCocoaBrowserListener::DestroyBrowserWindow()
|
CHBrowserListener::DestroyBrowserWindow()
|
||||||
{
|
{
|
||||||
// XXX Could send this up to the container, but for now,
|
// XXX Could send this up to the container, but for now,
|
||||||
// we just destroy the enclosing window.
|
// we just destroy the enclosing window.
|
||||||
|
@ -237,7 +237,7 @@ nsCocoaBrowserListener::DestroyBrowserWindow()
|
||||||
|
|
||||||
/* void sizeBrowserTo (in long aCX, in long aCY); */
|
/* void sizeBrowserTo (in long aCX, in long aCY); */
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsCocoaBrowserListener::SizeBrowserTo(PRInt32 aCX, PRInt32 aCY)
|
CHBrowserListener::SizeBrowserTo(PRInt32 aCX, PRInt32 aCY)
|
||||||
{
|
{
|
||||||
if (mContainer) {
|
if (mContainer) {
|
||||||
NSSize size;
|
NSSize size;
|
||||||
|
@ -253,7 +253,7 @@ nsCocoaBrowserListener::SizeBrowserTo(PRInt32 aCX, PRInt32 aCY)
|
||||||
|
|
||||||
/* void showAsModal (); */
|
/* void showAsModal (); */
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsCocoaBrowserListener::ShowAsModal()
|
CHBrowserListener::ShowAsModal()
|
||||||
{
|
{
|
||||||
if (!mView) {
|
if (!mView) {
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
|
@ -274,7 +274,7 @@ nsCocoaBrowserListener::ShowAsModal()
|
||||||
|
|
||||||
/* boolean isWindowModal (); */
|
/* boolean isWindowModal (); */
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsCocoaBrowserListener::IsWindowModal(PRBool *_retval)
|
CHBrowserListener::IsWindowModal(PRBool *_retval)
|
||||||
{
|
{
|
||||||
NS_ENSURE_ARG_POINTER(_retval);
|
NS_ENSURE_ARG_POINTER(_retval);
|
||||||
|
|
||||||
|
@ -285,7 +285,7 @@ nsCocoaBrowserListener::IsWindowModal(PRBool *_retval)
|
||||||
|
|
||||||
/* void exitModalEventLoop (in nsresult aStatus); */
|
/* void exitModalEventLoop (in nsresult aStatus); */
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsCocoaBrowserListener::ExitModalEventLoop(nsresult aStatus)
|
CHBrowserListener::ExitModalEventLoop(nsresult aStatus)
|
||||||
{
|
{
|
||||||
// [NSApp stopModalWithCode:(int)aStatus];
|
// [NSApp stopModalWithCode:(int)aStatus];
|
||||||
|
|
||||||
|
@ -294,7 +294,7 @@ nsCocoaBrowserListener::ExitModalEventLoop(nsresult aStatus)
|
||||||
|
|
||||||
// Implementation of nsIEmbeddingSiteWindow2
|
// Implementation of nsIEmbeddingSiteWindow2
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsCocoaBrowserListener::Blur()
|
CHBrowserListener::Blur()
|
||||||
{
|
{
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
@ -302,7 +302,7 @@ nsCocoaBrowserListener::Blur()
|
||||||
// Implementation of nsIEmbeddingSiteWindow
|
// Implementation of nsIEmbeddingSiteWindow
|
||||||
/* void setDimensions (in unsigned long flags, in long x, in long y, in long cx, in long cy); */
|
/* void setDimensions (in unsigned long flags, in long x, in long y, in long cx, in long cy); */
|
||||||
NS_IMETHODIMP
|
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)
|
if (!mView)
|
||||||
return NS_ERROR_FAILURE;
|
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); */
|
/* void getDimensions (in unsigned long flags, out long x, out long y, out long cx, out long cy); */
|
||||||
NS_IMETHODIMP
|
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)
|
if (!mView)
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
|
@ -380,7 +380,7 @@ nsCocoaBrowserListener::GetDimensions(PRUint32 flags, PRInt32 *x, PRInt32 *y,
|
||||||
|
|
||||||
/* void setFocus (); */
|
/* void setFocus (); */
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsCocoaBrowserListener::SetFocus()
|
CHBrowserListener::SetFocus()
|
||||||
{
|
{
|
||||||
if (!mView) {
|
if (!mView) {
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
|
@ -398,7 +398,7 @@ nsCocoaBrowserListener::SetFocus()
|
||||||
|
|
||||||
/* attribute boolean visibility; */
|
/* attribute boolean visibility; */
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsCocoaBrowserListener::GetVisibility(PRBool *aVisibility)
|
CHBrowserListener::GetVisibility(PRBool *aVisibility)
|
||||||
{
|
{
|
||||||
NS_ENSURE_ARG_POINTER(aVisibility);
|
NS_ENSURE_ARG_POINTER(aVisibility);
|
||||||
|
|
||||||
|
@ -416,7 +416,7 @@ nsCocoaBrowserListener::GetVisibility(PRBool *aVisibility)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsCocoaBrowserListener::SetVisibility(PRBool aVisibility)
|
CHBrowserListener::SetVisibility(PRBool aVisibility)
|
||||||
{
|
{
|
||||||
if (!mView) {
|
if (!mView) {
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
|
@ -439,7 +439,7 @@ nsCocoaBrowserListener::SetVisibility(PRBool aVisibility)
|
||||||
|
|
||||||
/* attribute wstring title; */
|
/* attribute wstring title; */
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsCocoaBrowserListener::GetTitle(PRUnichar * *aTitle)
|
CHBrowserListener::GetTitle(PRUnichar * *aTitle)
|
||||||
{
|
{
|
||||||
NS_ENSURE_ARG_POINTER(aTitle);
|
NS_ENSURE_ARG_POINTER(aTitle);
|
||||||
|
|
||||||
|
@ -463,7 +463,7 @@ nsCocoaBrowserListener::GetTitle(PRUnichar * *aTitle)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsCocoaBrowserListener::SetTitle(const PRUnichar * aTitle)
|
CHBrowserListener::SetTitle(const PRUnichar * aTitle)
|
||||||
{
|
{
|
||||||
NS_ENSURE_ARG(aTitle);
|
NS_ENSURE_ARG(aTitle);
|
||||||
|
|
||||||
|
@ -479,7 +479,7 @@ nsCocoaBrowserListener::SetTitle(const PRUnichar * aTitle)
|
||||||
|
|
||||||
/* [noscript] readonly attribute voidPtr siteWindow; */
|
/* [noscript] readonly attribute voidPtr siteWindow; */
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsCocoaBrowserListener::GetSiteWindow(void * *aSiteWindow)
|
CHBrowserListener::GetSiteWindow(void * *aSiteWindow)
|
||||||
{
|
{
|
||||||
NS_ENSURE_ARG_POINTER(aSiteWindow);
|
NS_ENSURE_ARG_POINTER(aSiteWindow);
|
||||||
*aSiteWindow = nsnull;
|
*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); */
|
/* void onStateChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in unsigned long aStateFlags, in unsigned long aStatus); */
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsCocoaBrowserListener::OnStateChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest,
|
CHBrowserListener::OnStateChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest,
|
||||||
PRUint32 aStateFlags, PRUint32 aStatus)
|
PRUint32 aStateFlags, PRUint32 aStatus)
|
||||||
{
|
{
|
||||||
NSEnumerator* enumerator = [mListeners objectEnumerator];
|
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); */
|
/* void onProgressChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in long aCurSelfProgress, in long aMaxSelfProgress, in long aCurTotalProgress, in long aMaxTotalProgress); */
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsCocoaBrowserListener::OnProgressChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest,
|
CHBrowserListener::OnProgressChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest,
|
||||||
PRInt32 aCurSelfProgress, PRInt32 aMaxSelfProgress,
|
PRInt32 aCurSelfProgress, PRInt32 aMaxSelfProgress,
|
||||||
PRInt32 aCurTotalProgress, PRInt32 aMaxTotalProgress)
|
PRInt32 aCurTotalProgress, PRInt32 aMaxTotalProgress)
|
||||||
{
|
{
|
||||||
|
@ -540,7 +540,7 @@ nsCocoaBrowserListener::OnProgressChange(nsIWebProgress *aWebProgress, nsIReques
|
||||||
|
|
||||||
/* void onLocationChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in nsIURI location); */
|
/* void onLocationChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in nsIURI location); */
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsCocoaBrowserListener::OnLocationChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest,
|
CHBrowserListener::OnLocationChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest,
|
||||||
nsIURI *location)
|
nsIURI *location)
|
||||||
{
|
{
|
||||||
if (!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); */
|
/* void onStatusChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in nsresult aStatus, in wstring aMessage); */
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsCocoaBrowserListener::OnStatusChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, nsresult aStatus,
|
CHBrowserListener::OnStatusChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, nsresult aStatus,
|
||||||
const PRUnichar *aMessage)
|
const PRUnichar *aMessage)
|
||||||
{
|
{
|
||||||
NSString* str = [NSString stringWithPRUnichars: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); */
|
/* void onSecurityChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in unsigned long state); */
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsCocoaBrowserListener::OnSecurityChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, PRUint32 state)
|
CHBrowserListener::OnSecurityChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, PRUint32 state)
|
||||||
{
|
{
|
||||||
NSEnumerator* enumerator = [mListeners objectEnumerator];
|
NSEnumerator* enumerator = [mListeners objectEnumerator];
|
||||||
id<NSBrowserListener> obj;
|
id<NSBrowserListener> obj;
|
||||||
|
@ -586,19 +586,19 @@ nsCocoaBrowserListener::OnSecurityChange(nsIWebProgress *aWebProgress, nsIReques
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
nsCocoaBrowserListener::AddListener(id <NSBrowserListener> aListener)
|
CHBrowserListener::AddListener(id <NSBrowserListener> aListener)
|
||||||
{
|
{
|
||||||
[mListeners addObject:aListener];
|
[mListeners addObject:aListener];
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
nsCocoaBrowserListener::RemoveListener(id <NSBrowserListener> aListener)
|
CHBrowserListener::RemoveListener(id <NSBrowserListener> aListener)
|
||||||
{
|
{
|
||||||
[mListeners removeObject:aListener];
|
[mListeners removeObject:aListener];
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
nsCocoaBrowserListener::SetContainer(id <NSBrowserContainer> aContainer)
|
CHBrowserListener::SetContainer(id <NSBrowserContainer> aContainer)
|
||||||
{
|
{
|
||||||
[mContainer autorelease];
|
[mContainer autorelease];
|
||||||
|
|
||||||
|
|
|
@ -44,13 +44,13 @@
|
||||||
#include "nsIHelperAppLauncherDialog.h"
|
#include "nsIHelperAppLauncherDialog.h"
|
||||||
#include "nsIFactory.h"
|
#include "nsIFactory.h"
|
||||||
|
|
||||||
class nsCocoaBrowserService : public nsIWindowCreator,
|
class CHBrowserService : public nsIWindowCreator,
|
||||||
public nsIFactory,
|
public nsIFactory,
|
||||||
public nsIHelperAppLauncherDialog
|
public nsIHelperAppLauncherDialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
nsCocoaBrowserService();
|
CHBrowserService();
|
||||||
virtual ~nsCocoaBrowserService();
|
virtual ~CHBrowserService();
|
||||||
|
|
||||||
NS_DECL_ISUPPORTS
|
NS_DECL_ISUPPORTS
|
||||||
NS_DECL_NSIWINDOWCREATOR
|
NS_DECL_NSIWINDOWCREATOR
|
||||||
|
@ -68,7 +68,7 @@ public:
|
||||||
static PRUint32 sNumBrowsers;
|
static PRUint32 sNumBrowsers;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static nsCocoaBrowserService* sSingleton;
|
static CHBrowserService* sSingleton;
|
||||||
static nsAlertController* sController;
|
static nsAlertController* sController;
|
||||||
static PRBool sCanTerminate;
|
static PRBool sCanTerminate;
|
||||||
};
|
};
|
||||||
|
|
|
@ -37,8 +37,8 @@
|
||||||
|
|
||||||
#import "NSString+Utils.h"
|
#import "NSString+Utils.h"
|
||||||
|
|
||||||
#import "nsCocoaBrowserService.h"
|
#import "CHBrowserService.h"
|
||||||
#import "DownloadFactories.h"
|
#import "CHDownloadFactories.h"
|
||||||
#import "CHBrowserView.h"
|
#import "CHBrowserView.h"
|
||||||
|
|
||||||
#include "nsIWindowWatcher.h"
|
#include "nsIWindowWatcher.h"
|
||||||
|
@ -51,41 +51,41 @@
|
||||||
#include "nsIDownload.h"
|
#include "nsIDownload.h"
|
||||||
#include "nsIExternalHelperAppService.h"
|
#include "nsIExternalHelperAppService.h"
|
||||||
|
|
||||||
nsAlertController* nsCocoaBrowserService::sController = nsnull;
|
nsAlertController* CHBrowserService::sController = nsnull;
|
||||||
nsCocoaBrowserService* nsCocoaBrowserService::sSingleton = nsnull;
|
CHBrowserService* CHBrowserService::sSingleton = nsnull;
|
||||||
PRUint32 nsCocoaBrowserService::sNumBrowsers = 0;
|
PRUint32 CHBrowserService::sNumBrowsers = 0;
|
||||||
PRBool nsCocoaBrowserService::sCanTerminate = PR_FALSE;
|
PRBool CHBrowserService::sCanTerminate = PR_FALSE;
|
||||||
|
|
||||||
// This method should return a nsModuleComponentInfo array of
|
// This method should return a nsModuleComponentInfo array of
|
||||||
// application-provided XPCOM components to register. The implementation
|
// application-provided XPCOM components to register. The implementation
|
||||||
// is in AppComponents.mm.
|
// is in AppComponents.mm.
|
||||||
extern const nsModuleComponentInfo* GetAppModuleComponentInfo(int* outNumComponents);
|
extern const nsModuleComponentInfo* GetAppModuleComponentInfo(int* outNumComponents);
|
||||||
|
|
||||||
// nsCocoaBrowserService implementation
|
// CHBrowserService implementation
|
||||||
nsCocoaBrowserService::nsCocoaBrowserService()
|
CHBrowserService::CHBrowserService()
|
||||||
{
|
{
|
||||||
NS_INIT_ISUPPORTS();
|
NS_INIT_ISUPPORTS();
|
||||||
}
|
}
|
||||||
|
|
||||||
nsCocoaBrowserService::~nsCocoaBrowserService()
|
CHBrowserService::~CHBrowserService()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMPL_ISUPPORTS3(nsCocoaBrowserService,
|
NS_IMPL_ISUPPORTS3(CHBrowserService,
|
||||||
nsIWindowCreator,
|
nsIWindowCreator,
|
||||||
nsIFactory,
|
nsIFactory,
|
||||||
nsIHelperAppLauncherDialog)
|
nsIHelperAppLauncherDialog)
|
||||||
|
|
||||||
/* static */
|
/* static */
|
||||||
nsresult
|
nsresult
|
||||||
nsCocoaBrowserService::InitEmbedding()
|
CHBrowserService::InitEmbedding()
|
||||||
{
|
{
|
||||||
sNumBrowsers++;
|
sNumBrowsers++;
|
||||||
|
|
||||||
if (sSingleton)
|
if (sSingleton)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
||||||
sSingleton = new nsCocoaBrowserService();
|
sSingleton = new CHBrowserService();
|
||||||
if (!sSingleton)
|
if (!sSingleton)
|
||||||
return NS_ERROR_OUT_OF_MEMORY;
|
return NS_ERROR_OUT_OF_MEMORY;
|
||||||
NS_ADDREF(sSingleton);
|
NS_ADDREF(sSingleton);
|
||||||
|
@ -141,7 +141,7 @@ nsCocoaBrowserService::InitEmbedding()
|
||||||
|
|
||||||
/* static */
|
/* static */
|
||||||
void
|
void
|
||||||
nsCocoaBrowserService::BrowserClosed()
|
CHBrowserService::BrowserClosed()
|
||||||
{
|
{
|
||||||
sNumBrowsers--;
|
sNumBrowsers--;
|
||||||
if (sCanTerminate && sNumBrowsers == 0) {
|
if (sCanTerminate && sNumBrowsers == 0) {
|
||||||
|
@ -156,7 +156,7 @@ nsCocoaBrowserService::BrowserClosed()
|
||||||
|
|
||||||
/* static */
|
/* static */
|
||||||
void
|
void
|
||||||
nsCocoaBrowserService::TermEmbedding()
|
CHBrowserService::TermEmbedding()
|
||||||
{
|
{
|
||||||
sCanTerminate = PR_TRUE;
|
sCanTerminate = PR_TRUE;
|
||||||
if (sNumBrowsers == 0) {
|
if (sNumBrowsers == 0) {
|
||||||
|
@ -178,7 +178,7 @@ nsCocoaBrowserService::TermEmbedding()
|
||||||
#define NS_ALERT_NIB_NAME "alert"
|
#define NS_ALERT_NIB_NAME "alert"
|
||||||
|
|
||||||
nsAlertController*
|
nsAlertController*
|
||||||
nsCocoaBrowserService::GetAlertController()
|
CHBrowserService::GetAlertController()
|
||||||
{
|
{
|
||||||
if (!sController) {
|
if (!sController) {
|
||||||
NSBundle* bundle = [NSBundle bundleForClass:[CHBrowserView class]];
|
NSBundle* bundle = [NSBundle bundleForClass:[CHBrowserView class]];
|
||||||
|
@ -188,7 +188,7 @@ nsCocoaBrowserService::GetAlertController()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
nsCocoaBrowserService::SetAlertController(nsAlertController* aController)
|
CHBrowserService::SetAlertController(nsAlertController* aController)
|
||||||
{
|
{
|
||||||
// XXX When should the controller be released?
|
// XXX When should the controller be released?
|
||||||
sController = aController;
|
sController = aController;
|
||||||
|
@ -197,7 +197,7 @@ nsCocoaBrowserService::SetAlertController(nsAlertController* aController)
|
||||||
|
|
||||||
// nsIFactory implementation
|
// nsIFactory implementation
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsCocoaBrowserService::CreateInstance(nsISupports *aOuter,
|
CHBrowserService::CreateInstance(nsISupports *aOuter,
|
||||||
const nsIID & aIID,
|
const nsIID & aIID,
|
||||||
void **aResult)
|
void **aResult)
|
||||||
{
|
{
|
||||||
|
@ -214,7 +214,7 @@ nsCocoaBrowserService::CreateInstance(nsISupports *aOuter,
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsCocoaBrowserService::LockFactory(PRBool lock)
|
CHBrowserService::LockFactory(PRBool lock)
|
||||||
{
|
{
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
@ -223,7 +223,7 @@ nsCocoaBrowserService::LockFactory(PRBool lock)
|
||||||
// Implementation of nsIWindowCreator
|
// Implementation of nsIWindowCreator
|
||||||
/* nsIWebBrowserChrome createChromeWindow (in nsIWebBrowserChrome parent, in PRUint32 chromeFlags); */
|
/* nsIWebBrowserChrome createChromeWindow (in nsIWebBrowserChrome parent, in PRUint32 chromeFlags); */
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsCocoaBrowserService::CreateChromeWindow(nsIWebBrowserChrome *parent,
|
CHBrowserService::CreateChromeWindow(nsIWebBrowserChrome *parent,
|
||||||
PRUint32 chromeFlags,
|
PRUint32 chromeFlags,
|
||||||
nsIWebBrowserChrome **_retval)
|
nsIWebBrowserChrome **_retval)
|
||||||
{
|
{
|
||||||
|
@ -241,13 +241,13 @@ nsCocoaBrowserService::CreateChromeWindow(nsIWebBrowserChrome *parent,
|
||||||
|
|
||||||
// void show( in nsIHelperAppLauncher aLauncher, in nsISupports aContext );
|
// void show( in nsIHelperAppLauncher aLauncher, in nsISupports aContext );
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsCocoaBrowserService::Show(nsIHelperAppLauncher* inLauncher, nsISupports* inContext)
|
CHBrowserService::Show(nsIHelperAppLauncher* inLauncher, nsISupports* inContext)
|
||||||
{
|
{
|
||||||
return inLauncher->SaveToDisk(nsnull, PR_FALSE);
|
return inLauncher->SaveToDisk(nsnull, PR_FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
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];
|
NSString* filename = [NSString stringWithPRUnichars:aDefaultFile];
|
||||||
NSSavePanel *thePanel = [NSSavePanel savePanel];
|
NSSavePanel *thePanel = [NSSavePanel savePanel];
|
||||||
|
@ -267,8 +267,8 @@ nsCocoaBrowserService::PromptForSaveToFile(nsISupports *aWindowContext, const PR
|
||||||
|
|
||||||
/* void showProgressDialog (in nsIHelperAppLauncher aLauncher, in nsISupports aContext); */
|
/* void showProgressDialog (in nsIHelperAppLauncher aLauncher, in nsISupports aContext); */
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsCocoaBrowserService::ShowProgressDialog(nsIHelperAppLauncher *aLauncher, nsISupports *aContext)
|
CHBrowserService::ShowProgressDialog(nsIHelperAppLauncher *aLauncher, nsISupports *aContext)
|
||||||
{
|
{
|
||||||
NSLog(@"nsCocoaBrowserService::ShowProgressDialog");
|
NSLog(@"CHBrowserService::ShowProgressDialog");
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
#import <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
|
|
||||||
@class CHBrowserView;
|
@class CHBrowserView;
|
||||||
class nsCocoaBrowserListener;
|
class CHBrowserListener;
|
||||||
class nsIDOMWindow;
|
class nsIDOMWindow;
|
||||||
class nsIWebBrowser;
|
class nsIWebBrowser;
|
||||||
class nsIDOMNode;
|
class nsIDOMNode;
|
||||||
|
@ -118,7 +118,7 @@ enum {
|
||||||
@interface CHBrowserView : NSView
|
@interface CHBrowserView : NSView
|
||||||
{
|
{
|
||||||
nsIWebBrowser* _webBrowser;
|
nsIWebBrowser* _webBrowser;
|
||||||
nsCocoaBrowserListener* _listener;
|
CHBrowserListener* _listener;
|
||||||
NSWindow* mWindow;
|
NSWindow* mWindow;
|
||||||
|
|
||||||
nsIDragHelperService* mDragHelper;
|
nsIDragHelperService* mDragHelper;
|
||||||
|
@ -186,7 +186,7 @@ enum {
|
||||||
|
|
||||||
- (void)destroyWebBrowser;
|
- (void)destroyWebBrowser;
|
||||||
- (nsIWebBrowser*)getWebBrowser;
|
- (nsIWebBrowser*)getWebBrowser;
|
||||||
- (nsCocoaBrowserListener*)getCocoaBrowserListener;
|
- (CHBrowserListener*)getCocoaBrowserListener;
|
||||||
- (void)setWebBrowser:(nsIWebBrowser*)browser;
|
- (void)setWebBrowser:(nsIWebBrowser*)browser;
|
||||||
|
|
||||||
- (NSString*)getFocusedURLString;
|
- (NSString*)getFocusedURLString;
|
||||||
|
|
|
@ -64,12 +64,12 @@
|
||||||
#include "nsNetUtil.h"
|
#include "nsNetUtil.h"
|
||||||
#include "SaveHeaderSniffer.h"
|
#include "SaveHeaderSniffer.h"
|
||||||
|
|
||||||
#import "CHBrowserWrapper.h"
|
#import "BrowserWrapper.h"
|
||||||
#import "CHBrowserView.h"
|
#import "CHBrowserView.h"
|
||||||
|
|
||||||
#import "FindDlgController.h"
|
#import "FindDlgController.h"
|
||||||
#import "nsCocoaBrowserService.h"
|
#import "CHBrowserService.h"
|
||||||
#import "nsCocoaBrowserListener.h"
|
#import "CHBrowserListener.h"
|
||||||
|
|
||||||
#import "mozView.h"
|
#import "mozView.h"
|
||||||
|
|
||||||
|
@ -100,12 +100,12 @@ const char kDirServiceContractID[] = "@mozilla.org/file/directory_service;1";
|
||||||
{
|
{
|
||||||
if ( (self = [super initWithFrame:frame]) )
|
if ( (self = [super initWithFrame:frame]) )
|
||||||
{
|
{
|
||||||
nsresult rv = nsCocoaBrowserService::InitEmbedding();
|
nsresult rv = CHBrowserService::InitEmbedding();
|
||||||
if (NS_FAILED(rv)) {
|
if (NS_FAILED(rv)) {
|
||||||
// XXX need to throw
|
// XXX need to throw
|
||||||
}
|
}
|
||||||
|
|
||||||
_listener = new nsCocoaBrowserListener(self);
|
_listener = new CHBrowserListener(self);
|
||||||
NS_ADDREF(_listener);
|
NS_ADDREF(_listener);
|
||||||
|
|
||||||
// Create the web browser instance
|
// Create the web browser instance
|
||||||
|
@ -148,7 +148,7 @@ const char kDirServiceContractID[] = "@mozilla.org/file/directory_service;1";
|
||||||
NS_RELEASE(_listener);
|
NS_RELEASE(_listener);
|
||||||
NS_IF_RELEASE(_webBrowser);
|
NS_IF_RELEASE(_webBrowser);
|
||||||
|
|
||||||
nsCocoaBrowserService::BrowserClosed();
|
CHBrowserService::BrowserClosed();
|
||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
NSLog(@"CHBrowserView died.");
|
NSLog(@"CHBrowserView died.");
|
||||||
|
@ -321,7 +321,7 @@ const char kDirServiceContractID[] = "@mozilla.org/file/directory_service;1";
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (nsCocoaBrowserListener*)getCocoaBrowserListener
|
- (CHBrowserListener*)getCocoaBrowserListener
|
||||||
{
|
{
|
||||||
return _listener;
|
return _listener;
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,14 +38,14 @@
|
||||||
// This file contains implementations of factories for various
|
// This file contains implementations of factories for various
|
||||||
// downloading-related interfaces.
|
// downloading-related interfaces.
|
||||||
|
|
||||||
#import "DownloadProgressDisplay.h"
|
#import "CHDownloadProgressDisplay.h"
|
||||||
#import "ProgressDlgController.h"
|
#import "ProgressDlgController.h"
|
||||||
|
|
||||||
#include "nsCOMPtr.h"
|
#include "nsCOMPtr.h"
|
||||||
#include "nsIFactory.h"
|
#include "nsIFactory.h"
|
||||||
|
|
||||||
#include "nsDownloadListener.h"
|
#include "nsDownloadListener.h"
|
||||||
#include "DownloadFactories.h"
|
#include "CHDownloadFactories.h"
|
||||||
|
|
||||||
// factory for nsIDownload objects
|
// factory for nsIDownload objects
|
||||||
// XXX replace with generic factory stuff
|
// XXX replace with generic factory stuff
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
|
|
||||||
There are three things here:
|
There are three things here:
|
||||||
|
|
||||||
1. The DownloadProgressDisplay protocol.
|
1. The CHDownloadProgressDisplay protocol.
|
||||||
|
|
||||||
This is a formal protocol that needs to be implemented by
|
This is a formal protocol that needs to be implemented by
|
||||||
a window controller for your progress window. Its methods
|
a window controller for your progress window. Its methods
|
||||||
|
@ -53,7 +53,7 @@
|
||||||
This class should be subclassed by an embedder, with an
|
This class should be subclassed by an embedder, with an
|
||||||
implementation of 'createDownloadController' that hands back
|
implementation of 'createDownloadController' that hands back
|
||||||
a new instance of an NSWindowController that implements the
|
a new instance of an NSWindowController that implements the
|
||||||
<DownloadProgressDisplay> protocol.
|
<CHDownloadProgressDisplay> protocol.
|
||||||
|
|
||||||
The underlying C++ classes use this factory to create the
|
The underlying C++ classes use this factory to create the
|
||||||
progress window controller.
|
progress window controller.
|
||||||
|
@ -108,7 +108,7 @@ class CHDownloader;
|
||||||
// a formal protocol for something that implements progress display
|
// a formal protocol for something that implements progress display
|
||||||
// Embedders can make a window controller that conforms to this
|
// Embedders can make a window controller that conforms to this
|
||||||
// protocol, and reuse nsDownloadListener to get download UI.
|
// protocol, and reuse nsDownloadListener to get download UI.
|
||||||
@protocol DownloadProgressDisplay
|
@protocol CHDownloadProgressDisplay
|
||||||
|
|
||||||
- (void)onStartDownload:(BOOL)isFileSave;
|
- (void)onStartDownload:(BOOL)isFileSave;
|
||||||
- (void)onEndDownload;
|
- (void)onEndDownload;
|
||||||
|
@ -127,7 +127,7 @@ class CHDownloader;
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSWindowController<DownloadProgressDisplay> *)createDownloadController;
|
- (NSWindowController<CHDownloadProgressDisplay> *)createDownloadController;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
@ -161,7 +161,7 @@ protected:
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
DownloadControllerFactory* mControllerFactory;
|
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
|
PRBool mIsFileSave; // true if we're doing a save, rather than a download
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -35,12 +35,12 @@
|
||||||
*
|
*
|
||||||
* ***** END LICENSE BLOCK ***** */
|
* ***** END LICENSE BLOCK ***** */
|
||||||
|
|
||||||
#import "DownloadProgressDisplay.h"
|
#import "CHDownloadProgressDisplay.h"
|
||||||
|
|
||||||
|
|
||||||
@implementation DownloadControllerFactory
|
@implementation DownloadControllerFactory
|
||||||
|
|
||||||
- (NSWindowController<DownloadProgressDisplay> *)createDownloadController
|
- (NSWindowController<CHDownloadProgressDisplay> *)createDownloadController
|
||||||
{
|
{
|
||||||
// a dummy implementation. You should provide a subclass that
|
// a dummy implementation. You should provide a subclass that
|
||||||
// returns an instance of your progress dialog controller.
|
// returns an instance of your progress dialog controller.
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
#import <AppKit/AppKit.h>
|
#import <AppKit/AppKit.h>
|
||||||
|
|
||||||
@interface CHExtendedOutlineView : NSOutlineView {
|
@interface ExtendedOutlineView : NSOutlineView {
|
||||||
SEL mDeleteAction;
|
SEL mDeleteAction;
|
||||||
|
|
||||||
NSRect mOldFrameRect;
|
NSRect mOldFrameRect;
|
||||||
|
|
|
@ -22,13 +22,13 @@
|
||||||
* Max Horn <max@quendi.de> (Context menu & tooltip code)
|
* Max Horn <max@quendi.de> (Context menu & tooltip code)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import "CHExtendedOutlineView.h"
|
#import "ExtendedOutlineView.h"
|
||||||
|
|
||||||
@interface CHExtendedOutlineView (Private)
|
@interface ExtendedOutlineView (Private)
|
||||||
- (void)_updateToolTipRect;
|
- (void)_updateToolTipRect;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation CHExtendedOutlineView
|
@implementation ExtendedOutlineView
|
||||||
|
|
||||||
- (id)initWithFrame:(NSRect)frame
|
- (id)initWithFrame:(NSRect)frame
|
||||||
{
|
{
|
||||||
|
@ -191,7 +191,7 @@
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
||||||
@implementation CHExtendedOutlineView (Private)
|
@implementation ExtendedOutlineView (Private)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set up tooltip rects for every row, but only if the frame size or
|
* Set up tooltip rects for every row, but only if the frame size or
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
#include "nsIDOMHTMLImageElement.h"
|
#include "nsIDOMHTMLImageElement.h"
|
||||||
#include "nsIDOMCharacterData.h"
|
#include "nsIDOMCharacterData.h"
|
||||||
|
|
||||||
class CHGeckoUtils
|
class GeckoUtils
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static void GatherTextUnder(nsIDOMNode* aNode, nsString& aResult) {
|
static void GatherTextUnder(nsIDOMNode* aNode, nsString& aResult) {
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
|
|
||||||
#import <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
|
|
||||||
@interface CHIconTabViewItem : NSTabViewItem
|
@interface IconTabViewItem : NSTabViewItem
|
||||||
{
|
{
|
||||||
NSImage *mTabIcon;
|
NSImage *mTabIcon;
|
||||||
NSDictionary *mLabelAttributes;
|
NSDictionary *mLabelAttributes;
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
|
|
||||||
#import "NSString+Utils.h"
|
#import "NSString+Utils.h"
|
||||||
|
|
||||||
#import "CHIconTabViewItem.h"
|
#import "IconTabViewItem.h"
|
||||||
#import "NSString+Utils.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
|
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;
|
- (void)setupLabelAttributes;
|
||||||
@end;
|
@end;
|
||||||
|
|
||||||
@implementation CHIconTabViewItem
|
@implementation IconTabViewItem
|
||||||
|
|
||||||
-(id)initWithIdentifier:(id)identifier withTabIcon:(NSImage *)tabIcon
|
-(id)initWithIdentifier:(id)identifier withTabIcon:(NSImage *)tabIcon
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#import <AppKit/NSImage.h>
|
#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 fraction:(float) delta;
|
||||||
- (void) drawFlippedInRect:(NSRect) rect operation:(NSCompositingOperation) op;
|
- (void) drawFlippedInRect:(NSRect) rect operation:(NSCompositingOperation) op;
|
||||||
- (void)applyBadge:(NSImage*)badge withAlpha:(float)alpha scale:(float)scale;
|
- (void)applyBadge:(NSImage*)badge withAlpha:(float)alpha scale:(float)scale;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#import "CHImageAdditions.h"
|
#import "ImageAdditions.h"
|
||||||
#import <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
|
|
||||||
@implementation NSImage (CHImageAdditions)
|
@implementation NSImage (ImageAdditions)
|
||||||
- (void) drawFlippedInRect:(NSRect) rect operation:(NSCompositingOperation) op fraction:(float) delta {
|
- (void) drawFlippedInRect:(NSRect) rect operation:(NSCompositingOperation) op fraction:(float) delta {
|
||||||
CGContextRef context;
|
CGContextRef context;
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ class nsIRDFContainerUtils;
|
||||||
class nsIRDFResource;
|
class nsIRDFResource;
|
||||||
class nsIRDFService;
|
class nsIRDFService;
|
||||||
|
|
||||||
@interface CHRDFOutlineViewDataSource : NSObject {
|
@interface RDFOutlineViewDataSource : NSObject {
|
||||||
nsIRDFDataSource* mDataSource;
|
nsIRDFDataSource* mDataSource;
|
||||||
nsIRDFContainer* mContainer;
|
nsIRDFContainer* mContainer;
|
||||||
nsIRDFContainerUtils* mContainerUtils;
|
nsIRDFContainerUtils* mContainerUtils;
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
|
|
||||||
#import "NSString+Utils.h"
|
#import "NSString+Utils.h"
|
||||||
|
|
||||||
#import "CHRDFOutlineViewDataSource.h"
|
#import "RDFOutlineViewDataSource.h"
|
||||||
|
|
||||||
#include "nsIRDFDataSource.h"
|
#include "nsIRDFDataSource.h"
|
||||||
#include "nsIRDFService.h"
|
#include "nsIRDFService.h"
|
||||||
|
@ -56,7 +56,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@implementation CHRDFOutlineViewDataSource
|
@implementation RDFOutlineViewDataSource
|
||||||
|
|
||||||
- (void) ensureDataSourceLoaded
|
- (void) ensureDataSourceLoaded
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#import "CHToolbarAdditions.h"
|
#import "ToolbarAdditions.h"
|
||||||
#import <Foundation/Foundation.h>
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
@implementation NSToolbar (CHToolbarCustomizableAdditions)
|
@implementation NSToolbar (CHToolbarCustomizableAdditions)
|
||||||
|
|
|
@ -24,13 +24,13 @@
|
||||||
#import <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
|
|
||||||
//
|
//
|
||||||
// protocol CHFind
|
// protocol Find
|
||||||
//
|
//
|
||||||
// Any window who wants to be able to work with the Find dialog should implement
|
// Any window who wants to be able to work with the Find dialog should implement
|
||||||
// this protocol.
|
// this protocol.
|
||||||
//
|
//
|
||||||
|
|
||||||
@protocol CHFind
|
@protocol Find
|
||||||
|
|
||||||
- (BOOL)findInPageWithPattern:(NSString*)text caseSensitive:(BOOL)inCaseSensitive
|
- (BOOL)findInPageWithPattern:(NSString*)text caseSensitive:(BOOL)inCaseSensitive
|
||||||
wrap:(BOOL)inWrap backwards:(BOOL)inBackwards;
|
wrap:(BOOL)inWrap backwards:(BOOL)inBackwards;
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
|
|
||||||
#import "FindDlgController.h"
|
#import "FindDlgController.h"
|
||||||
#import "BrowserWindowController.h"
|
#import "BrowserWindowController.h"
|
||||||
#import "CHFind.h"
|
#import "Find.h"
|
||||||
#include "nsCOMPtr.h"
|
#include "nsCOMPtr.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -70,8 +70,8 @@
|
||||||
-(IBAction) find: (id)aSender
|
-(IBAction) find: (id)aSender
|
||||||
{
|
{
|
||||||
NSWindowController* controller = [[NSApp mainWindow] windowController];
|
NSWindowController* controller = [[NSApp mainWindow] windowController];
|
||||||
if ( [controller conformsToProtocol:@protocol(CHFind)] ) {
|
if ( [controller conformsToProtocol:@protocol(Find)] ) {
|
||||||
id<CHFind> browserController = controller;
|
id<Find> browserController = controller;
|
||||||
BOOL ignoreCase = [mIgnoreCaseBox state];
|
BOOL ignoreCase = [mIgnoreCaseBox state];
|
||||||
BOOL wrapSearch = [mWrapAroundBox state];
|
BOOL wrapSearch = [mWrapAroundBox state];
|
||||||
BOOL searchBack = [mSearchBackwardsBox state];
|
BOOL searchBack = [mSearchBackwardsBox state];
|
||||||
|
@ -99,8 +99,8 @@
|
||||||
-(IBAction) findAgain: (id)aSender
|
-(IBAction) findAgain: (id)aSender
|
||||||
{
|
{
|
||||||
NSWindowController* controller = [[NSApp mainWindow] windowController];
|
NSWindowController* controller = [[NSApp mainWindow] windowController];
|
||||||
if ( [controller conformsToProtocol:@protocol(CHFind)] ) {
|
if ( [controller conformsToProtocol:@protocol(Find)] ) {
|
||||||
id<CHFind> browserController = controller;
|
id<Find> browserController = controller;
|
||||||
BOOL ignoreCase = [mIgnoreCaseBox state];
|
BOOL ignoreCase = [mIgnoreCaseBox state];
|
||||||
BOOL wrapSearch = [mWrapAroundBox state];
|
BOOL wrapSearch = [mWrapAroundBox state];
|
||||||
BOOL searchBack = [mSearchBackwardsBox state];
|
BOOL searchBack = [mSearchBackwardsBox state];
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
//
|
//
|
||||||
// CHHistoryDataSource.h
|
// HistoryDataSource.h
|
||||||
// Chimera
|
// Chimera
|
||||||
//
|
//
|
||||||
// Created by Ben Goodger on Sun Apr 28 2002.
|
// Created by Ben Goodger on Sun Apr 28 2002.
|
||||||
|
@ -8,11 +8,11 @@
|
||||||
|
|
||||||
#import <Foundation/Foundation.h>
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
#import "CHRDFOutlineViewDataSource.h"
|
#import "RDFOutlineViewDataSource.h"
|
||||||
|
|
||||||
@class BrowserWindowController;
|
@class BrowserWindowController;
|
||||||
|
|
||||||
@interface CHHistoryDataSource : CHRDFOutlineViewDataSource
|
@interface HistoryDataSource : RDFOutlineViewDataSource
|
||||||
{
|
{
|
||||||
|
|
||||||
IBOutlet BrowserWindowController* mBrowserWindowController;
|
IBOutlet BrowserWindowController* mBrowserWindowController;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
//
|
//
|
||||||
// CHHistoryDataSource.mm
|
// HistoryDataSource.mm
|
||||||
// Chimera
|
// Chimera
|
||||||
//
|
//
|
||||||
// Created by Ben Goodger on Sun Apr 28 2002.
|
// Created by Ben Goodger on Sun Apr 28 2002.
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
#import "NSString+Utils.h"
|
#import "NSString+Utils.h"
|
||||||
|
|
||||||
#import "BrowserWindowController.h"
|
#import "BrowserWindowController.h"
|
||||||
#import "CHHistoryDataSource.h"
|
#import "HistoryDataSource.h"
|
||||||
#import "CHBrowserView.h"
|
#import "CHBrowserView.h"
|
||||||
|
|
||||||
#include "nsIRDFService.h"
|
#include "nsIRDFService.h"
|
||||||
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
#include "nsComponentManagerUtils.h"
|
#include "nsComponentManagerUtils.h"
|
||||||
|
|
||||||
@implementation CHHistoryDataSource
|
@implementation HistoryDataSource
|
||||||
|
|
||||||
- (void) ensureDataSourceLoaded
|
- (void) ensureDataSourceLoaded
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
#import "MVPreferencesController.h"
|
#import "MVPreferencesController.h"
|
||||||
#import "MVPreferencesMultipleIconView.h"
|
#import "MVPreferencesMultipleIconView.h"
|
||||||
#import "MVPreferencesGroupedIconView.h"
|
#import "MVPreferencesGroupedIconView.h"
|
||||||
#import "CHToolbarAdditions.h"
|
#import "ToolbarAdditions.h"
|
||||||
|
|
||||||
#include "nsCOMPtr.h"
|
#include "nsCOMPtr.h"
|
||||||
#include "nsIServiceManager.h"
|
#include "nsIServiceManager.h"
|
||||||
#include "nsIPref.h"
|
#include "nsIPref.h"
|
||||||
#include "nsCocoaBrowserService.h"
|
#include "CHBrowserService.h"
|
||||||
|
|
||||||
// #import "Defines.h"
|
// #import "Defines.h"
|
||||||
|
|
||||||
|
@ -114,7 +114,7 @@ NSString *MVPreferencesWindowNotification = @"MVPreferencesWindowNotification";
|
||||||
// with it in |windowDidClose()|. Need to ensure this is exactly balanced with |BrowserClosed()|
|
// 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
|
// 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.
|
// the window visible. Too bad cocoa doesn't give us any notifications of this.
|
||||||
nsCocoaBrowserService::InitEmbedding();
|
CHBrowserService::InitEmbedding();
|
||||||
}
|
}
|
||||||
[self showAll:nil];
|
[self showAll:nil];
|
||||||
[window makeKeyAndOrderFront:nil];
|
[window makeKeyAndOrderFront:nil];
|
||||||
|
@ -236,7 +236,7 @@ NSString *MVPreferencesWindowNotification = @"MVPreferencesWindowNotification";
|
||||||
[[NSUserDefaults standardUserDefaults] synchronize];
|
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||||
|
|
||||||
// tell gecko that this window no longer needs it around.
|
// tell gecko that this window no longer needs it around.
|
||||||
nsCocoaBrowserService::BrowserClosed();
|
CHBrowserService::BrowserClosed();
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSToolbarItem *) toolbar:(NSToolbar *) toolbar
|
- (NSToolbarItem *) toolbar:(NSToolbar *) toolbar
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#import <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
#import "MVPreferencesMultipleIconView.h"
|
#import "MVPreferencesMultipleIconView.h"
|
||||||
#import "MVPreferencesController.h"
|
#import "MVPreferencesController.h"
|
||||||
#import "CHImageAdditions.h"
|
#import "ImageAdditions.h"
|
||||||
|
|
||||||
@interface MVPreferencesMultipleIconView (MVPreferencesMultipleIconViewPrivate)
|
@interface MVPreferencesMultipleIconView (MVPreferencesMultipleIconViewPrivate)
|
||||||
- (void) _focusFirst;
|
- (void) _focusFirst;
|
||||||
|
|
|
@ -40,14 +40,14 @@
|
||||||
|
|
||||||
class nsIPref;
|
class nsIPref;
|
||||||
|
|
||||||
@interface CHPreferenceManager : NSObject
|
@interface PreferenceManager : NSObject
|
||||||
{
|
{
|
||||||
NSUserDefaults* mDefaults;
|
NSUserDefaults* mDefaults;
|
||||||
ICInstance mInternetConfig;
|
ICInstance mInternetConfig;
|
||||||
nsIPref* mPrefs;
|
nsIPref* mPrefs;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (CHPreferenceManager *)sharedInstance;
|
+ (PreferenceManager *)sharedInstance;
|
||||||
|
|
||||||
- (id) init;
|
- (id) init;
|
||||||
- (void) dealloc;
|
- (void) dealloc;
|
||||||
|
|
|
@ -39,8 +39,8 @@
|
||||||
#import <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
|
|
||||||
#import <SystemConfiguration/SystemConfiguration.h>
|
#import <SystemConfiguration/SystemConfiguration.h>
|
||||||
#import "CHPreferenceManager.h"
|
#import "PreferenceManager.h"
|
||||||
#import "CHUserDefaults.h"
|
#import "UserDefaults.h"
|
||||||
|
|
||||||
#include "nsIServiceManager.h"
|
#include "nsIServiceManager.h"
|
||||||
#include "nsIProfile.h"
|
#include "nsIProfile.h"
|
||||||
|
@ -58,12 +58,12 @@ nsresult PR_CALLBACK
|
||||||
app_getModuleInfo(nsStaticModuleInfo **info, PRUint32 *count);
|
app_getModuleInfo(nsStaticModuleInfo **info, PRUint32 *count);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@implementation CHPreferenceManager
|
@implementation PreferenceManager
|
||||||
|
|
||||||
|
|
||||||
+ (CHPreferenceManager *) sharedInstance {
|
+ (PreferenceManager *) sharedInstance {
|
||||||
static CHPreferenceManager *sSharedInstance = nil;
|
static PreferenceManager *sSharedInstance = nil;
|
||||||
return ( sSharedInstance ? sSharedInstance : (sSharedInstance = [[[CHPreferenceManager alloc] init] autorelease] ));
|
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">
|
<plist version="0.9">
|
||||||
<dict>
|
<dict>
|
||||||
<key>IBDocumentLocation</key>
|
<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>
|
<key>IBEditorPositions</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>124</key>
|
<key>124</key>
|
||||||
|
@ -39,11 +39,7 @@
|
||||||
<string>4</string>
|
<string>4</string>
|
||||||
<key>IBLockedObjects</key>
|
<key>IBLockedObjects</key>
|
||||||
<array/>
|
<array/>
|
||||||
<key>IBOpenObjects</key>
|
|
||||||
<array>
|
|
||||||
<integer>10</integer>
|
|
||||||
</array>
|
|
||||||
<key>IBSystem Version</key>
|
<key>IBSystem Version</key>
|
||||||
<string>5S60</string>
|
<string>5S66</string>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</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;
|
ICInstance icInstance = NULL;
|
||||||
OSStatus error;
|
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
|
// all that code into the plugin
|
||||||
error = ICStart(&icInstance, 'CHIM');
|
error = ICStart(&icInstance, 'CHIM');
|
||||||
if (error != noErr) {
|
if (error != noErr) {
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
// Hookup cookie prefs. Relies on the tags of the radio buttons in the matrix being
|
// 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
|
// 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.
|
// at startup.
|
||||||
PRInt32 acceptCookies = 0;
|
PRInt32 acceptCookies = 0;
|
||||||
mPrefService->GetIntPref("network.cookie.cookieBehavior", &acceptCookies);
|
mPrefService->GetIntPref("network.cookie.cookieBehavior", &acceptCookies);
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<key>AppleEventCode</key>
|
<key>AppleEventCode</key>
|
||||||
<string>GURL</string>
|
<string>GURL</string>
|
||||||
<key>CommandClass</key>
|
<key>CommandClass</key>
|
||||||
<string>CHGetURLCommand</string>
|
<string>GetURLCommand</string>
|
||||||
</dict>
|
</dict>
|
||||||
<key>OpenURL</key>
|
<key>OpenURL</key>
|
||||||
<dict>
|
<dict>
|
||||||
|
@ -22,7 +22,7 @@
|
||||||
<key>AppleEventCode</key>
|
<key>AppleEventCode</key>
|
||||||
<string>OURL</string>
|
<string>OURL</string>
|
||||||
<key>CommandClass</key>
|
<key>CommandClass</key>
|
||||||
<string>CHGetURLCommand</string>
|
<string>GetURLCommand</string>
|
||||||
</dict>
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
<key>Name</key>
|
<key>Name</key>
|
||||||
|
|
|
@ -1,5 +1,13 @@
|
||||||
{
|
{
|
||||||
IBClasses = (
|
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; },
|
{CLASS = BookmarkItem; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
||||||
{
|
{
|
||||||
ACTIONS = {
|
ACTIONS = {
|
||||||
|
@ -20,6 +28,11 @@
|
||||||
};
|
};
|
||||||
SUPERCLASS = NSObject;
|
SUPERCLASS = NSObject;
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
CLASS = BookmarksOutlineView;
|
||||||
|
LANGUAGE = ObjC;
|
||||||
|
SUPERCLASS = ExtendedOutlineView;
|
||||||
|
},
|
||||||
{CLASS = BookmarksToolbar; LANGUAGE = ObjC; SUPERCLASS = NSView; },
|
{CLASS = BookmarksToolbar; LANGUAGE = ObjC; SUPERCLASS = NSView; },
|
||||||
{CLASS = BrowserTabView; LANGUAGE = ObjC; SUPERCLASS = NSTabView; },
|
{CLASS = BrowserTabView; LANGUAGE = ObjC; SUPERCLASS = NSTabView; },
|
||||||
{
|
{
|
||||||
|
@ -65,7 +78,7 @@
|
||||||
mBackItem = NSMenuItem;
|
mBackItem = NSMenuItem;
|
||||||
mCachedBMDS = id;
|
mCachedBMDS = id;
|
||||||
mForwardItem = NSMenuItem;
|
mForwardItem = NSMenuItem;
|
||||||
mHistoryDataSource = CHHistoryDataSource;
|
mHistoryDataSource = HistoryDataSource;
|
||||||
mImageLinkMenu = NSMenu;
|
mImageLinkMenu = NSMenu;
|
||||||
mImageMenu = NSMenu;
|
mImageMenu = NSMenu;
|
||||||
mInputMenu = NSMenu;
|
mInputMenu = NSMenu;
|
||||||
|
@ -75,7 +88,7 @@
|
||||||
mLocationToolbarView = NSView;
|
mLocationToolbarView = NSView;
|
||||||
mLock = NSImageView;
|
mLock = NSImageView;
|
||||||
mPageMenu = NSMenu;
|
mPageMenu = NSMenu;
|
||||||
mPersonalToolbar = CHBookmarksToolbar;
|
mPersonalToolbar = BookmarksToolbar;
|
||||||
mProgress = NSProgressIndicator;
|
mProgress = NSProgressIndicator;
|
||||||
mProxyIcon = NSImageView;
|
mProxyIcon = NSImageView;
|
||||||
mSidebarBookmarksDataSource = BookmarksDataSource;
|
mSidebarBookmarksDataSource = BookmarksDataSource;
|
||||||
|
@ -85,28 +98,14 @@
|
||||||
mSidebarTabView = NSTabView;
|
mSidebarTabView = NSTabView;
|
||||||
mStatus = NSTextField;
|
mStatus = NSTextField;
|
||||||
mStatusBar = NSView;
|
mStatusBar = NSView;
|
||||||
mTabBrowser = CHExtendedTabView;
|
mTabBrowser = BrowserTabView;
|
||||||
mURLBar = NSTextField;
|
mURLBar = NSTextField;
|
||||||
};
|
};
|
||||||
SUPERCLASS = NSWindowController;
|
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; };
|
ACTIONS = {load = id; };
|
||||||
CLASS = CHBrowserWrapper;
|
CLASS = BrowserWrapper;
|
||||||
LANGUAGE = ObjC;
|
LANGUAGE = ObjC;
|
||||||
OUTLETS = {
|
OUTLETS = {
|
||||||
mLockIcon = id;
|
mLockIcon = id;
|
||||||
|
@ -118,43 +117,23 @@
|
||||||
};
|
};
|
||||||
SUPERCLASS = NSView;
|
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;
|
LANGUAGE = ObjC;
|
||||||
OUTLETS = {mBrowserWindowController = id; };
|
OUTLETS = {mBrowserWindowController = id; };
|
||||||
SUPERCLASS = CHRDFOutlineViewDataSource;
|
SUPERCLASS = RDFOutlineViewDataSource;
|
||||||
},
|
},
|
||||||
{CLASS = CHLocationBar; LANGUAGE = ObjC; SUPERCLASS = NSView; },
|
{CLASS = LocationBar; LANGUAGE = ObjC; SUPERCLASS = NSView; },
|
||||||
{CLASS = CHPageProxyIcon; LANGUAGE = ObjC; SUPERCLASS = NSImageView; },
|
{CLASS = MainController; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
||||||
|
{CLASS = PageProxyIcon; LANGUAGE = ObjC; SUPERCLASS = NSImageView; },
|
||||||
{
|
{
|
||||||
CLASS = CHRDFOutlineViewDataSource;
|
CLASS = RDFOutlineViewDataSource;
|
||||||
LANGUAGE = ObjC;
|
LANGUAGE = ObjC;
|
||||||
OUTLETS = {mOutlineView = id; };
|
OUTLETS = {mOutlineView = id; };
|
||||||
SUPERCLASS = NSObject;
|
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 = RDFOutlineViewItem; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
||||||
{CLASS = ThrobberHandler; LANGUAGE = ObjC; SUPERCLASS = NSObject; }
|
{CLASS = ThrobberHandler; LANGUAGE = ObjC; SUPERCLASS = NSObject; }
|
||||||
);
|
);
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<plist version="0.9">
|
<plist version="0.9">
|
||||||
<dict>
|
<dict>
|
||||||
<key>IBDocumentLocation</key>
|
<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>
|
<key>IBEditorPositions</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>124</key>
|
<key>124</key>
|
||||||
|
@ -39,11 +39,7 @@
|
||||||
<string>4</string>
|
<string>4</string>
|
||||||
<key>IBLockedObjects</key>
|
<key>IBLockedObjects</key>
|
||||||
<array/>
|
<array/>
|
||||||
<key>IBOpenObjects</key>
|
|
||||||
<array>
|
|
||||||
<integer>10</integer>
|
|
||||||
</array>
|
|
||||||
<key>IBSystem Version</key>
|
<key>IBSystem Version</key>
|
||||||
<string>5S60</string>
|
<string>5S66</string>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</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;
|
LANGUAGE = ObjC;
|
||||||
SUPERCLASS = ToolbarController;
|
SUPERCLASS = ToolbarController;
|
||||||
},
|
},
|
||||||
{CLASS = CHGoMenu; LANGUAGE = ObjC; SUPERCLASS = NSMenu; },
|
|
||||||
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
||||||
|
{CLASS = GoMenu; LANGUAGE = ObjC; SUPERCLASS = NSMenu; },
|
||||||
{
|
{
|
||||||
ACTIONS = {
|
ACTIONS = {
|
||||||
addBookmark = id;
|
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 ***** */
|
* ***** END LICENSE BLOCK ***** */
|
||||||
|
|
||||||
#import "CHAboutBox.h"
|
#import "AboutBox.h"
|
||||||
|
|
||||||
#include "nsBuildID.h"
|
#include "nsBuildID.h"
|
||||||
|
|
||||||
@interface CHAboutBox(Private)
|
@interface AboutBox(Private)
|
||||||
- (void)loadWindow;
|
- (void)loadWindow;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation CHAboutBox
|
@implementation AboutBox
|
||||||
|
|
||||||
static CHAboutBox *sharedInstance = nil;
|
static AboutBox *sharedInstance = nil;
|
||||||
|
|
||||||
+ (CHAboutBox *)sharedInstance
|
+ (AboutBox *)sharedInstance
|
||||||
{
|
{
|
||||||
return sharedInstance ? sharedInstance : [[self alloc] init];
|
return sharedInstance ? sharedInstance : [[self alloc] init];
|
||||||
}
|
}
|
||||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче