Night of the Living Dead CVS files - rekilling files that got changes made after they were killed


git-svn-id: svn://10.0.0.236/trunk@102742 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mkaply%us.ibm.com
2001-09-11 04:45:47 +00:00
parent 2fa9205419
commit b1120cb472
7 changed files with 0 additions and 1286 deletions

View File

@@ -1,360 +0,0 @@
<?xml version="1.0"?> <!-- -*- Mode: HTML -*- -->
<!-- The contents of this file are subject to the Netscape 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/NPL/
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 Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1998-2000 Netscape Communications Corporation. All
Rights Reserved.
Contributor(s): ______________________________________. -->
<?xml-stylesheet href="chrome://navigator/skin/" type="text/css"?>
<!-- XXX - the placement of this include could be temporary -->
<?xml-stylesheet href="chrome://communicator/skin/bookmarks/bookmarksToolbar.css" type="text/css"?>
<?xul-overlay href="chrome://navigator/content/navigatorOverlay.xul"?>
<?xul-overlay href="chrome://navigator/content/navExtraOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/sidebar/sidebarOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/securityOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/communicatorOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/contentAreaContextOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/bookmarks/bookmarksOverlay.xul"?>
<!DOCTYPE window [
<!ENTITY % brandDTD SYSTEM "chrome://global/locale/brand.dtd" >
%brandDTD;
<!ENTITY % buildDTD SYSTEM "chrome://global/content/build.dtd" >
%buildDTD;
<!ENTITY % navigatorDTD SYSTEM "chrome://navigator/locale/navigator.dtd" >
%navigatorDTD;
]>
<window id="main-window" xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="Startup()" onunload="Shutdown()"
contenttitlesetting="true"
title="&mainWindow.title;"
titlemodifier="&mainWindow.titlemodifier;"
titlemenuseparator="&mainWindow.titlemodifiermenuseparator;"
windowtype="navigator:browser" orient="vertical"
width="640" height="480"
screenX="10" screenY="10"
persist="screenX screenY width height sizemode">
<!-- Generic Utility -->
<script type="application/x-javascript" src="chrome://global/content/nsJSSupportsUtils.js"/>
<script type="application/x-javascript" src="chrome://global/content/nsJSComponentManager.js"/>
<script type="application/x-javascript" src="chrome://global/content/nsUserSettings.js"/>
<script type="application/x-javascript" src="chrome://global/content/nsTransferable.js"/>
<script type="application/x-javascript" src="chrome://global/content/nsClipboard.js"/>
<script type="application/x-javascript" src="chrome://global/content/nsDragAndDrop.js"/>
<script type="application/x-javascript" src="chrome://global/content/strres.js"/>
<!-- Content Area -->
<script type="application/x-javascript" src="chrome://navigator/content/nsBrowserStatusHandler.js"/>
<script type="application/x-javascript" src="chrome://navigator/content/nsBrowserContentListener.js"/>
<script type="application/x-javascript" src="chrome://communicator/content/contentAreaClick.js"/>
<script type="application/x-javascript" src="chrome://communicator/content/contentAreaDD.js"/>
<script type="application/x-javascript" src="chrome://communicator/content/findUtils.js"/>
<!-- Shared Bookmarks Utility Library -->
<script type="application/x-javascript" src="chrome://communicator/content/bookmarks/bookmarksOverlay.js"/>
<script type="application/x-javascript" src="chrome://navigator/content/personalToolbar.js"/>
<!-- Navigator -->
<script type="application/x-javascript" src="chrome://navigator/content/navigator.js"/>
<script type="application/x-javascript" src="tooltip.js"/>
<script type="application/x-javascript" src="navigatorDD.js"/>
<script type="application/x-javascript" src="chrome://navigator/content/sessionHistoryUI.js"/>
<!-- hook for stringbundle overlays -->
<stringbundleset id="stringbundleset">
<stringbundle id="bundle_navigator" src="chrome://navigator/locale/navigator.properties"/>
<stringbundle id="bundle_brand" src="chrome://global/locale/brand.properties"/>
<stringbundle id="bundle_navigator_region" src="chrome://navigator-region/locale/region.properties"/>
<stringbundle id="bundle_brand_region" src="chrome://global-region/locale/region.properties"/>
<stringbundle id="findBundle" src="chrome://global/locale/finddialog.properties"/>
</stringbundleset>
<resourcebundle id="resource_bundle_navigator" />
<commandset id="commands">
<commandset id="globalEditMenuItems"/>
<commandset id="selectEditMenuItems"/>
<commandset id="undoEditMenuItems"/>
<commandset id="clipboardEditMenuItems"/>
<!-- <command id="cmd_pageSetup"/> -->
<command id="toggleSidebar"/>
</commandset>
<!-- broadcasters are appended from the overlay -->
<broadcasterset id="navBroadcasters"/>
<!-- keys are appended from the overlay -->
<keyset id="navKeys">
<key id="showHideSidebar"/>
</keyset>
<popupset id="aHTMLTooltipSet">
<tooltip id="aHTMLTooltip" onpopupshowing="return FillInHTMLTooltip(document.tooltipNode);" >
<vbox id="HTML_TOOLTIP_tooltipBox"/>
</tooltip>
<popup id="backMenu" position="after_start" onpopupshowing="return BrowserBackMenu(event);" oncommand="gotoHistoryIndex(event);"/>
<popup id="forwardMenu" position="after_start" onpopupshowing="return BrowserForwardMenu(event);" oncommand="gotoHistoryIndex(event);"/>
<popup id="sidebarPopup"/>
<popupset id="bookmarksPopupset"/>
<!-- context menu -->
<popupset id="contentAreaContextSet"/>
<!-- tooltips -->
<popupset id="aTooltipSet"/>
</popupset>
<script type="application/x-javascript">
var gBookmarkPopup = null;
</script>
<toolbox id="navigator-toolbox" class="toolbox-top" deferattached="true">
<!-- Menu -->
<menubar id="main-menubar" persist="collapsed"/>
<toolbar class="toolbar-primary chromeclass-toolbar" id="nav-bar" persist="collapsed"
tbalign="stretch">
<hbox id="nav-bar-buttons">
<menubutton id="back-button" label="&backButton.label;" tooltiptext="&backButton.tooltip;"
oncommand="gotoHistoryIndex(event);" buttonaction="BrowserBack();" context="backMenu"
class="menubutton-dual top" crop="right" tooltip="aTooltip" observes="canGoBack">
<menupopup context="" onpopupshowing="BrowserBackMenu(event);"/>
</menubutton>
<menubutton id="forward-button" label="&forwardButton.label;" tooltiptext="&forwardButton.tooltip;"
oncommand="gotoHistoryIndex(event);" buttonaction="BrowserForward();" context="forwardMenu"
class="menubutton-dual top" crop="right" tooltip="aTooltip" observes="canGoForward">
<menupopup context="" onpopupshowing="BrowserForwardMenu(event);"/>
</menubutton>
<button class="button-toolbar-1 top" id="reload-button" crop="right" oncommand="if (event.shiftKey) BrowserReloadSkipCache(); else BrowserReload();" label="&reloadButton.label;"
tooltip="aTooltip" tooltiptext="&reloadButton.tooltip;"/>
<button class="button-toolbar-1 top" id="stop-button" crop="right" observes="canStop" oncommand="BrowserStop();" label="&stopButton.label;"
tooltip="aTooltip" tooltiptext="&stopButton.tooltip;"/>
</hbox>
<hbox id="nav-bar-inner" flex="1">
<hbox id="urlbar-group" class="box-toolbar-group chromeclass-location" flex="1">
<hbox flex="1" id="urlbar-container">
<textbox id="urlbar" class="plain" flex="1"
type="autocomplete" searchSessions="history"
timeout="50" maxrows="6" alwaysOpenPopup="true"
defaultSearchEngine="true" tabScrolling="true"
showCommentColumn="true"
tooltip="aTooltip" tooltiptext="&locationBar.tooltip;"
ontextcommand="return handleURLBarCommand(userAction);"
ontextrevert="return handleURLBarRevert();"
onfocus="URLBarFocusHandler(event);"
onblur="URLBarBlurHandler(event);">
<image id="page-proxy-button" allowevents="true"
ondraggesture="PageProxyDragGesture(event);"/>
<menupopup id="ubhist-popup" class="autocomplete-history-popup"
popupalign="topleft" popupanchor="bottomleft"
onpopupshowing="createUBHistoryMenu(event.target);"
oncommand="executeUrlBarHistoryCommand(event.target);"/>
</textbox>
</hbox>
</hbox>
<button class="button-toolbar-3 chromeclass-location" id="go-button" persist="hidden" hidden="true" label="&goButton.label;"
oncommand="addToUrlbarHistory(); BrowserLoadURL();" ondragover="nsDragAndDrop.dragOver(event, goButtonObserver);"
ondragdrop="nsDragAndDrop.drop(event, goButtonObserver);" ondragexit="nsDragAndDrop.dragExit(event, goButtonObserver);"
tooltip="aTooltip" tooltiptext="&goButton.tooltip;"/>
<button class="button-toolbar-3 chromeclass-location" persist="hidden"
id="search-button" label="&searchButton.label;" ondragover="nsDragAndDrop.dragOver(event, searchButtonObserver);"
ondragdrop="nsDragAndDrop.drop(event, searchButtonObserver);" ondragexit="nsDragAndDrop.dragExit(event, searchButtonObserver);"
oncommand="OpenSearch('internet',false, document.getElementById('urlbar').value);"
tooltip="aTooltip" tooltiptext="&searchButton.tooltip;"/>
</hbox>
<menubutton class="menubutton-dual top" id="print-button" persist="hidden" label="&printButton.label;"
crop="right" buttonaction="BrowserPrint()" tooltip="aTooltip" tooltiptext="&printButton.tooltip;">
<menupopup id="printMenu" popupalign="topright" popupanchor="bottomright">
<menuitem label="&printCmd.label;" accesskey="&printCmd.accesskey;" oncommand="BrowserPrint()" default="true"/>
</menupopup>
</menubutton>
<hbox id="throbber-box" align="center">
<button id="navigator-throbber" oncommand="goClickThrobber('browser.throbber.url')" tooltip="aTooltip" tooltiptext="&throbber.tooltip;"/>
</hbox>
</toolbar>
<toolbar id="PersonalToolbar" class="chromeclass-directories" persist="collapsed" dragdroparea="innermostBox"
ondragover="nsDragAndDrop.dragOver(event, personalToolbarObserver);"
ondragdrop="nsDragAndDrop.drop(event, personalToolbarObserver);"
ondraggesture="nsDragAndDrop.startDrag(event, personalToolbarObserver);"
ondragexit="nsDragAndDrop.dragExit(event, personalToolbarObserver);"
tbalign="stretch">
<button class="button-toolbar bookmark-item" id="home-button" label="&homeButton.label;"
tooltip="aTooltip" persist="hidden"
ondraggesture="nsDragAndDrop.startDrag(event, homeButtonObserver);"
ondragover="nsDragAndDrop.dragOver(event, homeButtonObserver);"
ondragdrop="nsDragAndDrop.drop(event, homeButtonObserver);"
ondragexit="nsDragAndDrop.dragExit(event, homeButtonObserver);"
oncommand="BrowserHome(); event.preventBubble();"/>
<toolbarseparator/>
<!-- "Bookmarks" button on personal toolbar -->
<menubutton class="button-toolbar bookmark-item" id="bookmarks-button"
persist="hidden" label="&bookmarksButton.label;" hidden="false"
datasources="rdf:bookmarks rdf:files rdf:localsearch rdf:internetsearch"
ref="NC:BookmarksRoot" container="true" flags="dont-test-empty"
oncommand="OpenBookmarkURL(event.target,document.getElementById('BookmarksMenu').database)"
ondragover="nsDragAndDrop.dragOver(event, bookmarksButtonObserver);"
template="bookmarksMenuTemplate">
<menupopup onpopuphiding="gDidOpen = false;" ondragdrop="nsDragAndDrop.drop(event, menuDNDObserver); event.preventBubble();"
ondragexit="nsDragAndDrop.dragExit(event, menuDNDObserver); event.preventBubble();"
ondragover="nsDragAndDrop.dragOver(event, menuDNDObserver); event.preventBubble();">
<menuitem accesskey="&addCurPageCmd.accesskey;" key="addBookmarkKb" observes="Browser:AddBookmark"
ondragover="event.preventBubble(); return false;"/>
<menuitem accesskey="&addCurPageAsCmd.accesskey;" key="addBookmarkAsKb" observes="Browser:AddBookmarkAs"
ondragover="event.preventBubble(); return false;"/>
<menuseparator ondragover="event.preventBubble(); return false;"/>
<menuitem accesskey="&manBookmarksCmd.accesskey;" key="manBookmarkKb" observes="Browser:ManageBookmark"
ondragover="event.preventBubble(); return false;"/>
<menuseparator/>
</menupopup>
</menubutton>
<!-- Personal toolbar items -->
<hbox id="innermostBox" flex="1" style="min-width: 1px;" context="bmContext"
datasources="rdf:bookmarks rdf:files rdf:localsearch rdf:internetsearch"
ref="NC:PersonalToolbarFolder" flags="dont-test-empty"
type="http://home.netscape.com/NC-rdf#Folder"
oncommand="OpenBookmarkURL(event.target, document.getElementById('innermostBox').database)">
<template>
<rule parent="hbox" rdf:type="http://home.netscape.com/NC-rdf#BookmarkSeparator">
<toolbarseparator uri="rdf:*"
type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type"/>
</rule>
<!-- yes, the type attribute is necessary otherwise all leaves are
treated as containers for some reason -->
<rule parent="hbox" iscontainer="true" isempty="true"
rdf:type="http://home.netscape.com/NC-rdf#Folder">
<menubutton class="button-toolbar bookmark-item" uri="rdf:*" editable="true"
type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
label="rdf:http://home.netscape.com/NC-rdf#Name"
ondraggesture="if (!event.altKey) { event.preventBubble(); return false; }">
<menupopup>
<menuitem label="&emptyItem.label;" disabled="true"/>
</menupopup>
</menubutton>
</rule>
<rule parent="hbox" iscontainer="true">
<menubutton class="button-toolbar bookmark-item" uri="rdf:*" editable="true"
type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
label="rdf:http://home.netscape.com/NC-rdf#Name"
ondraggesture="if (!event.altKey) { event.preventBubble(); return false; }">
<menupopup ondraggesture="nsDragAndDrop.startDrag(event, personalToolbarObserver);"/>
</menubutton>
</rule>
<rule parent="hbox">
<button class="button-toolbar bookmark-item" uri="rdf:*" editable="true"
status="rdf:http://home.netscape.com/WEB-rdf#status"
tooltip="aTooltip" tooltiptext="rdf:http://home.netscape.com/NC-rdf#URL"
type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
label="rdf:http://home.netscape.com/NC-rdf#Name" crop="right"/>
</rule>
<rule iscontainer="true" isempty="true"
rdf:type="http://home.netscape.com/NC-rdf#Folder">
<menupopup>
<menu class="menu-iconic bookmark-item" uri="rdf:*"
type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
label="rdf:http://home.netscape.com/NC-rdf#Name">
<menupopup>
<menuitem label="&emptyItem.label;" disabled="true"
ondraggesture="event.preventBubble(); return false;"/>
</menupopup>
</menu>
</menupopup>
</rule>
<rule iscontainer="true">
<menupopup>
<menu class="menu-iconic bookmark-item" uri="rdf:*"
type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
label="rdf:http://home.netscape.com/NC-rdf#Name">
<menupopup/>
</menu>
</menupopup>
</rule>
<rule rdf:type="http://home.netscape.com/NC-rdf#BookmarkSeparator">
<menupopup>
<menuseparator uri="rdf:*"
type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type"/>
</menupopup>
</rule>
<rule>
<menupopup>
<menuitem class="menuitem-iconic bookmark-item" uri="rdf:*"
status="rdf:http://home.netscape.com/WEB-rdf#status"
type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
label="rdf:http://home.netscape.com/NC-rdf#Name"/>
</menupopup>
</rule>
</template>
</hbox>
</toolbar>
</toolbox>
<hbox flex="1">
<vbox id="sidebar-box" class="chromeclass-extrachrome"/>
<splitter id="sidebar-splitter" class="chromeclass-extrachrome" />
<vbox id="appcontent" flex="1"
ondragover="nsDragAndDrop.dragOver(event, contentAreaDNDObserver);"
ondragdrop="nsDragAndDrop.drop(event, contentAreaDNDObserver);">
<!-- this box is temporary, pending XBLified <browser> -->
<hbox id="browser" flex="1">
<browser id="content" type="content-primary" src="about:blank"
flex="1" tooltip="aHTMLTooltip"
context="contentAreaContextMenu"
onclick="return contentAreaClick(event);"
ondraggesture="nsDragAndDrop.startDrag(event, contentAreaDNDObserver);"/>
</hbox>
</vbox>
</hbox>
<statusbar id="status-bar" class="chromeclass-status"
ondragover="nsDragAndDrop.dragOver(event, contentAreaDNDObserver);"
ondragdrop="nsDragAndDrop.drop(event, contentAreaDNDObserver);">
<hbox id="component-bar"/>
<statusbarpanel id="statusbar-display" label="&statusText.label;" crop="right" flex="1"/>
<progressmeter class="progressmeter-statusbar" statusbar="true" id="statusbar-icon" mode="normal" value="0"/>
<statusbarpanel class="statusbarpanel-icononly" id="offline-status"/>
<statusbarpanel class="statusbarpanel-icononly" id="security-button"/>
</statusbar>
</window>

View File

@@ -1,406 +0,0 @@
/* -*- Mode: C++; tab-width: 4; 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, Inc. Portions created by Netscape are
* Copyright (C) 1999, Mozilla. All Rights Reserved.
*
* Contributor(s):
* Radha Kulkarni <radha@netscape.com>
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsISupportsUtils.h"
//#include "nsCOMPtr.h"
#include "nsIDOMDocument.h"
#include "nsSHEntry.h"
#ifdef XXX_NS_DEBUG // XXX: we'll need a logging facility for debugging
#define WEB_TRACE(_bit,_args) \
PR_BEGIN_MACRO \
if (WEB_LOG_TEST(gLogModule,_bit)) { \
PR_LogPrint _args; \
} \
PR_END_MACRO
#else
#define WEB_TRACE(_bit,_args)
#endif
//*****************************************************************************
//*** nsSHEnumerator: Object Management
//*****************************************************************************
class nsSHEnumerator : public nsIEnumerator
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIENUMERATOR
NS_IMETHOD CurrentItem(nsISHEntry ** aItem);
private:
friend class nsSHEntry;
nsSHEnumerator(nsSHEntry * aEntry);
virtual ~nsSHEnumerator();
PRInt32 mIndex;
nsSHEntry * mSHEntry;
};
//*****************************************************************************
//*** nsSHEntry: Object Management
//*****************************************************************************
nsSHEntry::nsSHEntry()
{
NS_INIT_REFCNT();
mURI = (nsnull);
mPostData = (nsnull);
mDocument= (nsnull);
mLayoutHistoryState= (nsnull);
}
NS_IMETHODIMP
nsSHEntry::Create(nsIURI * aURI, const PRUnichar * aTitle, nsIDOMDocument * aDOMDocument,
nsIInputStream * aInputStream, nsISupports * aHistoryLayoutState)
{
SetUri(aURI);
SetTitle(aTitle);
SetDocument(aDOMDocument);
SetPostData(aInputStream);
SetLayoutHistoryState(aHistoryLayoutState);
return NS_OK;
}
nsSHEntry::~nsSHEntry()
{
NS_IF_RELEASE(mURI);
NS_IF_RELEASE(mPostData);
NS_IF_RELEASE(mDocument);
NS_IF_RELEASE(mLayoutHistoryState);
if (mTitle)
delete mTitle;
DestroyChildren();
}
void
nsSHEntry::DestroyChildren() {
PRInt32 i, n;
n = GetChildCount(&n);
for (i = 0; i < n; i++) {
nsISHEntry* child = (nsISHEntry *) mChildren.ElementAt(i);
child->SetParent(nsnull); // Weak reference to parent
delete child;
}
mChildren.Clear();
}
// nsSHEntry::nsISupports
NS_IMPL_ISUPPORTS2(nsSHEntry, nsISHEntry, nsISHContainer)
NS_IMETHODIMP
nsSHEntry::GetUri(nsIURI **aUri)
{
NS_ENSURE_ARG_POINTER(aUri);
*aUri = mURI;
NS_IF_ADDREF(mURI);
return NS_OK;
}
NS_IMETHODIMP
nsSHEntry::SetUri(nsIURI * aUri)
{
NS_IF_RELEASE(mURI);
mURI = aUri;
NS_IF_ADDREF(mURI);
return NS_OK;
}
NS_IMETHODIMP
nsSHEntry::SetDocument(nsIDOMDocument * aDocument)
{
NS_IF_RELEASE(mDocument);
mDocument = aDocument;
NS_IF_ADDREF(mDocument);
return NS_OK;
}
NS_IMETHODIMP
nsSHEntry::GetDocument(nsIDOMDocument ** aResult)
{
NS_ENSURE_ARG_POINTER(aResult);
*aResult = mDocument;
NS_IF_ADDREF(mDocument);
return NS_OK;
}
NS_IMETHODIMP
nsSHEntry::GetTitle(PRUnichar** aTitle)
{
NS_ENSURE_ARG_POINTER(aTitle);
if (mTitle)
*aTitle = mTitle->ToNewUnicode();
return NS_OK;
}
NS_IMETHODIMP
nsSHEntry::SetTitle(const PRUnichar* aTitle)
{
if (mTitle)
delete mTitle;
if (aTitle)
mTitle = new nsString(aTitle);
return NS_OK;
}
NS_IMETHODIMP
nsSHEntry::GetPostData(nsIInputStream ** aResult)
{
NS_ENSURE_ARG_POINTER(aResult);
*aResult = mPostData;
NS_IF_ADDREF(mPostData);
return NS_OK;
}
NS_IMETHODIMP
nsSHEntry::SetPostData(nsIInputStream * aPostData)
{
NS_IF_RELEASE(mPostData);
mPostData = aPostData;
NS_IF_ADDREF(aPostData);
return NS_OK;
}
NS_IMETHODIMP
nsSHEntry::GetLayoutHistoryState(nsISupports ** aResult)
{
NS_ENSURE_ARG_POINTER(aResult);
*aResult = mLayoutHistoryState;
NS_IF_ADDREF(mLayoutHistoryState);
return NS_OK;
}
NS_IMETHODIMP
nsSHEntry::SetLayoutHistoryState(nsISupports * aState)
{
NS_IF_RELEASE(mLayoutHistoryState);
mLayoutHistoryState = aState;
NS_IF_ADDREF(aState);
return NS_OK;
}
NS_IMETHODIMP
nsSHEntry::GetParent(nsISHEntry ** aResult)
{
NS_ENSURE_ARG_POINTER(aResult);
*aResult = mParent;
NS_IF_ADDREF(*aResult);
return NS_OK;
}
NS_IMETHODIMP
nsSHEntry::SetParent(nsISHEntry * aParent)
{
/* parent not Addrefed on purpose to avoid cyclic reference
* Null parent is OK
*/
mParent = aParent;
return NS_OK;
}
NS_IMETHODIMP
nsSHEntry::GetChildCount(PRInt32 * aCount)
{
NS_ENSURE_ARG_POINTER(aCount);
*aCount = mChildren.Count();
return NS_OK;
}
NS_IMETHODIMP
nsSHEntry::AddChild(nsISHEntry * aChild)
{
NS_ENSURE_ARG_POINTER(aChild);
NS_ENSURE_SUCCESS(aChild->SetParent(this), NS_ERROR_FAILURE);
mChildren.AppendElement((void *)aChild);
NS_ADDREF(aChild);
return NS_OK;
}
NS_IMETHODIMP
nsSHEntry::RemoveChild(nsISHEntry * aChild)
{
NS_ENSURE_ARG_POINTER(aChild);
PRBool childRemoved = mChildren.RemoveElement((void *)aChild);
if (childRemoved) {
aChild->SetParent(nsnull);
NS_RELEASE(aChild);
}
return NS_OK;
}
NS_IMETHODIMP
nsSHEntry::GetChildEnumerator(nsIEnumerator** aChildEnumerator)
{
nsresult status = NS_OK;
NS_ENSURE_ARG_POINTER(aChildEnumerator);
nsSHEnumerator * iterator = new nsSHEnumerator(this);
if (iterator && !!NS_SUCCEEDED(status = CallQueryInterface(iterator, aChildEnumerator)))
delete iterator;
return status;
}
//*****************************************************************************
//*** nsSHEnumerator: Object Management
//*****************************************************************************
nsSHEnumerator::nsSHEnumerator(nsSHEntry * aEntry):mIndex(0)
{
NS_INIT_REFCNT();
mSHEntry = aEntry;
}
nsSHEnumerator::~nsSHEnumerator()
{
}
NS_IMETHODIMP
nsSHEnumerator::Next()
{
mIndex++;
PRUint32 cnt=0;
cnt = mSHEntry->mChildren.Count();
if (mIndex < (PRInt32)cnt)
return NS_OK;
return NS_ERROR_FAILURE;
}
#if 0
NS_IMETHODIMP
nsSHEnumerator::Prev()
{
mIndex--;
if (mIndex >= 0 )
return NS_OK;
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP
nsSHEnumerator::Last()
{
PRUint32 cnt;
nsresult rv = mSHEntry->mChildren.Count(&cnt);
if (NS_FAILED(rv)) return rv;
mIndex = (PRInt32)cnt-1;
return NS_OK;
}
#endif /* 0 */
NS_IMETHODIMP
nsSHEnumerator::First()
{
mIndex = 0;
return NS_OK;
}
NS_IMETHODIMP
nsSHEnumerator::CurrentItem(nsISupports **aItem)
{
if (!aItem)
return NS_ERROR_NULL_POINTER;
PRUint32 cnt= mSHEntry->mChildren.Count();
if (mIndex >=0 && mIndex < (PRInt32)cnt){
*aItem = (nsISupports *)mSHEntry->mChildren.ElementAt(mIndex);
NS_IF_ADDREF(*aItem);
return NS_OK;
}
return NS_ERROR_FAILURE;
}
NS_IMPL_ISUPPORTS1(nsSHEnumerator, nsIEnumerator)
NS_IMETHODIMP
nsSHEnumerator::CurrentItem(nsISHEntry **aItem)
{
if (!aItem)
return NS_ERROR_NULL_POINTER;
PRUint32 cnt = mSHEntry->mChildren.Count();
if (mIndex >=0 && mIndex < (PRInt32)cnt){
nsCOMPtr<nsISupports> indexIsupports = (nsISHEntry *) mSHEntry->mChildren.ElementAt(mIndex);
return indexIsupports->QueryInterface(NS_GET_IID(nsISHEntry),(void **)aItem);
}
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP
nsSHEnumerator::IsDone()
{
PRUint32 cnt;
cnt = mSHEntry->mChildren.Count();
if (mIndex >= 0 && mIndex < (PRInt32)cnt ) {
return NS_ENUMERATOR_FALSE;
}
return NS_OK;
}
#if 0
NS_IMETHODIMP
nsRangeListIterator::QueryInterface(REFNSIID aIID, void** aInstancePtr)
{
if (nsnull == aInstancePtr) {
return NS_ERROR_NULL_POINTER;
}
if (aIID.Equals(NS_GET_IID(nsIEnumerator))) {
*aInstancePtr = NS_STATIC_CAST(nsIEnumerator*, this);
NS_ADDREF_THIS();
return NS_OK;
}
if (aIID.Equals(NS_GET_IID(nsIBidirectionalEnumerator))) {
*aInstancePtr = NS_STATIC_CAST(nsIBidirectionalEnumerator*, this);
NS_ADDREF_THIS();
return NS_OK;
}
return mDomSelection->QueryInterface(aIID, aInstancePtr);
}
#endif
////////////END nsSHEnumerator methods

View File

@@ -1,107 +0,0 @@
<?xml version="1.0"?>
<!--
The contents of this file are subject to the Netscape 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/NPL/
implied. See the License for the specific language governing
rights and limitations under the License.
The Original Code is Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1998-1999 Netscape Communications Corporation. All
Rights Reserved.
Contributor(s):
Håkan Waara <hwaara@chello.se>
Peter Annema <disttsc@bart.nl>
-->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/dialogOverlay.css" type="text/css"?>
<!DOCTYPE window [
<!ENTITY % brandDTD SYSTEM "chrome://global/locale/brand.dtd" >
%brandDTD;
<!ENTITY % prefCookieDTD SYSTEM "chrome://communicator/locale/pref/pref-cookies.dtd" >
%prefCookieDTD;
]>
<window xmlns:html="http://www.w3.org/1999/xhtml" id="cookieWindow"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
class="color-dialog"
orient="vertical"
onload="init();">
<script type="application/x-javascript">
<![CDATA[
var _elementIDs = ["networkCookieBehaviour", "networkWarnAboutCookies"];
function init()
{
parent.initPanel('chrome://communicator/content/pref/pref-cookies.xul');
var enabled = document.getElementById("networkCookieBehaviour").value != "2";
setWarnAboutCookiesEnabled(enabled);
}
function viewCookies()
{
window.openDialog("chrome://communicator/content/wallet/CookieViewer.xul","","modal=yes,chrome,resizable=yes", 0);
}
function viewTutorial()
{
window.openDialog
("chrome://communicator/content/wallet/privacy.xul","","modal=yes,chrome,resizable=yes,height=400,width=600", 0);
}
function setWarnAboutCookiesEnabled(aEnabled)
{
document.getElementById("networkWarnAboutCookies").disabled = !aEnabled;
}
]]>
</script>
<box class="box-smallheader" id="cookieHeader" title="&lHeader;"/>
<titledbox orient="vertical">
<label value="&cookiePolicy.label;"/>
<html>&cookieDetails;</html>
<radiogroup id="networkCookieBehaviour" orient="vertical" autostretch="never"
pref="true" preftype="int" prefstring="network.cookie.cookieBehavior"
prefattribute="value">
<radio group="networkCookieBehaviour" value="2" label="&disableCookies.label;"
accesskey="&disableCookies.accesskey;" oncommand="setWarnAboutCookiesEnabled(false);"/>
<radio group="networkCookieBehaviour" value="0" label="&accAllCookiesRadio.label;"
accesskey="&accAllCookiesRadio.accesskey;" oncommand="setWarnAboutCookiesEnabled(true);"/>
<radio group="networkCookieBehaviour" value="1" label="&accOrgCookiesRadio.label;"
accesskey="&accOrgCookiesRadio.accesskey;" oncommand="setWarnAboutCookiesEnabled(true);"/>
</radiogroup>
<separator/>
<box autostretch="never">
<checkbox id="networkWarnAboutCookies" label="&warnAboutCookies.label;" accesskey="&warnAboutCookies.accesskey;"
pref="true" preftype="bool" prefstring="network.cookie.warnAboutCookies"
prefattribute="checked"/>
</box>
<separator/>
<box autostretch="never" halign="right">
<button class="dialog" label="&viewCookies.label;" accesskey="&viewCookies.accesskey;" oncommand="viewCookies();"/>
<button class="dialog" label="&viewTutorial.label;" accesskey="&viewTutorial.accesskey;" oncommand="viewTutorial();"/>
</box>
</titledbox>
</window>

View File

@@ -1,119 +0,0 @@
<?xml version="1.0"?>
<!--
The contents of this file are subject to the Netscape 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/NPL/
implied. See the License for the specific language governing
rights and limitations under the License.
The Original Code is Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1998-1999 Netscape Communications Corporation. All
Rights Reserved.
Contributor(s):
Håkan Waara <hwaara@chello.se>
Peter Annema <disttsc@bart.nl>
-->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/dialogOverlay.css" type="text/css"?>
<!DOCTYPE window [
<!ENTITY % brandDTD SYSTEM "chrome://global/locale/brand.dtd" >
%brandDTD;
<!ENTITY % prefImagesDTD SYSTEM "chrome://communicator/locale/pref/pref-images.dtd" >
%prefImagesDTD;
]>
<window debug="false" xmlns:html="http://www.w3.org/1999/xhtml" id="imagesWindow"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
class="color-dialog"
orient="vertical"
onload="init();">
<script type="application/x-javascript">
<![CDATA[
var _elementIDs = ["accOrgImages", "networkImageBehaviour", "networkImageWarnAboutImages"];
function init()
{
parent.initPanel('chrome://communicator/content/pref/pref-images.xul');
imageBlockingEnabled();
var enabled = document.getElementById("networkImageBehaviour").value != "2";
setWarnAboutImagesEnabled(enabled);
}
// Present finer control over image loading to the user.
// enable image blocker if "imageblocker.enabled" pref is true
function imageBlockingEnabled()
{
if (parent.hPrefWindow.getPref("bool", "imageblocker.enabled"))
document.getElementById("haveImageBlocking").removeAttribute("hidden");
}
function viewImages()
{
window.openDialog("chrome://communicator/content/wallet/CookieViewer.xul","",
"modal=yes,chrome,resizable=yes", 2);
}
function setWarnAboutImagesEnabled(aEnabled)
{
document.getElementById("networkImageWarnAboutImages").disabled = !aEnabled;
}
]]>
</script>
<broadcaster id="haveImageBlocking" hidden="true"/>
<box class="box-smallheader" id="imagesHeader" title="&lHeader;"/>
<titledbox orient="vertical" id="imagesArea">
<label value="&imageBlocking.label;"/>
<html>&imageDetails;</html>
<radiogroup id="networkImageBehaviour" orient="vertical" autostretch="never"
pref="true" preftype="int" prefstring="network.image.imageBehavior"
prefattribute="value">
<radio group="networkImageBehaviour" value="2" label="&disableImages.label;"
accesskey="&disableImages.accesskey;"
oncommand="setWarnAboutImagesEnabled(false);"/>
<radio group="networkImageBehaviour" value="0" label="&accAllImagesRadio.label;"
accesskey="&accAllImagesRadio.accesskey;"
oncommand="setWarnAboutImagesEnabled(true);"/>
<radio group="networkImageBehaviour" value="1" label="&accOrgImagesRadio.label;"
accesskey="&accOrgImagesRadio.accesskey;"
id="accOrgImages" observes="haveImageBlocking"
oncommand="setWarnAboutImagesEnabled(true);"/>
</radiogroup>
<separator observes="haveImageBlocking"/>
<box autostretch="never">
<checkbox id="networkImageWarnAboutImages" label="&warnAboutImages.label;"
accesskey="&warnAboutImages.accesskey;" observes="haveImageBlocking"
pref="true" preftype="bool" prefattribute="checked"
prefstring="network.image.warnAboutImages"/>
</box>
<separator observes="haveImageBlocking"/>
<box autostretch="never" halign="right">
<button class="dialog" id="viewImages" label="&viewImages.label;"
accesskey="&viewImages.accesskey;" oncommand="viewImages();"
observes="haveImageBlocking"/>
</box>
</titledbox>
</window>

View File

@@ -1,92 +0,0 @@
<?xml version="1.0"?>
<!--
The contents of this file are subject to the Netscape 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/NPL/
implied. See the License for the specific language governing
rights and limitations under the License.
The Original Code is Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1998-1999 Netscape Communications Corporation. All
Rights Reserved.
Contributor(s):
-->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/dialogOverlay.css" type="text/css"?>
<!DOCTYPE window [
<!ENTITY % brandDTD SYSTEM "chrome://global/locale/brand.dtd" >
%brandDTD;
<!ENTITY % prefWalletDTD SYSTEM "chrome://communicator/locale/pref/pref-passwords.dtd" >
%prefWalletDTD;
]>
<window xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
class="color-dialog"
orient="vertical"
onload="parent.initPanel('chrome://communicator/content/pref/pref-passwords.xul');">
<script type="application/x-javascript">
<![CDATA[
var _elementIDs = ["signonRememberSignons", "encryptEnabled"];
function viewSignons()
{
window.openDialog("chrome://communicator/content/wallet/SignonViewer.xul","","modal=yes,chrome,resizable=yes", "S");
}
function changePasswords()
{
wallet = Components.classes['@mozilla.org/wallet;1'];
wallet = wallet.getService();
wallet = wallet.QueryInterface(Components.interfaces.nsIWalletService);
wallet.WALLET_ChangePassword();
}
function initReencryptCallback()
{
wallet = Components.classes['@mozilla.org/wallet/wallet-service;1'];
wallet = wallet.getService();
wallet = wallet.QueryInterface(Components.interfaces.nsIWalletService);
wallet.WALLET_InitReencryptCallback(window);
}
]]>
</script>
<box class="box-smallheader" title="&lHeader;"/>
<titledbox orient="vertical">
<label value="&signonHeader.label;"/>
<html flex="1">&signonDescription.label;</html>
<box autostretch="never">
<checkbox id="signonRememberSignons" label="&signonEnabled.label;" accesskey="&signonEnabled.accesskey;"
pref="true" preftype="bool" prefstring="signon.rememberSignons"
prefattribute="checked"/>
</box>
<box autostretch="never" halign="right">
<button class="dialog" label="&viewSignons.label;" accesskey="&viewSignons.accesskey;"
oncommand="viewSignons();"/>
</box>
</titledbox>
<titledbox orient="vertical">
<label value="&encryptHeader.label;"/>
<html flex="1">&encryptDescription.label;</html>
<box autostretch="never">
<checkbox id="encryptEnabled" label="&encryptEnabled.label;" accesskey="&encryptEnabled.accesskey;"
pref="true" preftype="bool" prefstring="wallet.crypto"
prefattribute="checked" oncommand="initReencryptCallback();"/>
</box>
</titledbox>
</window>

View File

@@ -1,83 +0,0 @@
<?xml version="1.0"?>
<!--
The contents of this file are subject to the Netscape 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/NPL/
implied. See the License for the specific language governing
rights and limitations under the License.
The Original Code is Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1998-1999 Netscape Communications Corporation. All
Rights Reserved.
Contributor(s):
-->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/dialogOverlay.css" type="text/css"?>
<!DOCTYPE window [
<!ENTITY % brandDTD SYSTEM "chrome://global/locale/brand.dtd" >
%brandDTD;
<!ENTITY % prefWalletDTD SYSTEM "chrome://communicator/locale/pref/pref-wallet.dtd" >
%prefWalletDTD;
]>
<window xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
class="color-dialog"
orient="vertical" title="&window.title;"
onload="parent.initPanel('chrome://communicator/content/pref/pref-wallet.xul');">
<script type="application/x-javascript">
<![CDATA[
var _elementIDs = ["walletCaptureForms"];
function viewWallet()
{
window.openDialog(
"chrome://communicator/content/wallet/WalletViewer.xul",
"WalletViewer",
"chrome,titlebar,modal=yes,resizable=yes");
}
function viewWalletSites()
{
window.openDialog("chrome://communicator/content/wallet/SignonViewer.xul","","modal=yes,chrome,resizable=no", "W");
}
]]>
</script>
<box class="box-smallheader" title="&lHeader;"/>
<titledbox orient="vertical">
<label value="&walletHeader.label;"/>
<html>&walletDescription.label;</html>
<!--
<box autostretch="never">
<text class="label" for="walletServer" value="&walletServer.label;" accesskey="&walletServer.accesskey;"/>
<textbox id="walletServer" flex="1"
pref="true" preftype="string" prefstring="wallet.Server"
prefattribute="value"/>
</box>
-->
<box autostretch="never">
<checkbox id="walletCaptureForms" label="&walletEnabled.label;" accesskey="&walletEnabled.accesskey;"
pref="true" preftype="bool" prefstring="wallet.captureForms"
prefattribute="checked"/>
</box>
<box autostretch="never" halign="right">
<button class="dialog" label="&viewWallet.label;" accesskey="&viewWallet.accesskey;"
oncommand="viewWallet();"/>
<button class="dialog" label="&viewWalletSites.label;" accesskey="&viewWalletSites.accesskey;"
oncommand="viewWalletSites();"/>
</box>
</titledbox>
</window>

View File

@@ -1,119 +0,0 @@
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* 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 mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Alec Flett <alecf@netscape.com>
* Jason Eager <jce2@po.cwru.edu>
*/
const nsIFilePicker = Components.interfaces.nsIFilePicker;
const nsIFileURL = Components.interfaces.nsIFileURL;
function getFileOrFolderSpec( aTitle, aFolder )
{
try {
var fp = Components.classes["@mozilla.org/filepicker;1"].createInstance(nsIFilePicker);
}
catch(e) {
dump("*** failed to create fileSpecWithUI or fileSpec objects\n");
return false;
}
try {
var mode;
if (aFolder)
mode = nsIFilePicker.modeGetFolder;
else
mode = nsIFilePicker.modeOpen;
fp.init(window, aTitle, mode);
fp.appendFilters(nsIFilePicker.filterAll);
var ret = fp.show();
if (ret == nsIFilePicker.returnCancel)
return -1;
}
catch(e) {
dump("Error: " + e + "\n");
return -1;
}
return fp.file;
}
function prefNavSelectFile(folderFieldId, stringId, useNative)
{
var folderField = document.getElementById(folderFieldId);
var dlgString = stringId ? bundle.GetStringFromName(stringId) : '';
var file = getFileOrFolderSpec( dlgString, false );
if( file != -1 )
{
/* XXX nsILocalFile doesn't have a URL string */
if (useNative)
{
folderField.value = file.unicodePath;
}
else
{
try {
var fileURL = Components.classes["@mozilla.org/network/standard-url;1"].createInstance(nsIFileURL);
fileURL.file = file;
var url = fileURL.spec;
if( url )
folderField.value = url;
}
catch(e) {
}
}
}
}
function setHomePageToCurrentPage(folderFieldId)
{
var windowManager = Components.classes["@mozilla.org/rdf/datasource;1?name=window-mediator"].getService(Components.interfaces.nsIWindowMediator);
var browserWindow = windowManager.getMostRecentWindow("navigator:browser");
if (browserWindow) {
var browser = browserWindow.document.getElementById("content");
var url = browser.webNavigation.currentURI.spec;
if (url) {
var homePageField = document.getElementById(folderFieldId);
homePageField.value = url;
}
}
}
function prefClearGlobalHistory()
{
var globalHistory = Components.classes["@mozilla.org/browser/global-history;1"].getService(Components.interfaces.nsIBrowserHistory);
if (globalHistory)
globalHistory.removeAllPages();
}
function prefClearUrlbarHistory()
{
var button = document.getElementById("ClearUrlBarHistoryButton");
var urlBarHist = Components.classes["@mozilla.org/browser/urlbarhistory;1"].getService(Components.interfaces.nsIUrlbarHistory);
if ( urlBarHist )
{
urlBarHist.clearHistory();
button.setAttribute("disabled","true");
}
}
var bundle = srGetStrBundle("chrome://communicator/locale/pref/prefutilities.properties");