зеркало из https://github.com/mozilla/pjs.git
Initial revision. Not yet part of the build.
This commit is contained in:
Родитель
ac339b80c0
Коммит
7b2a02a1fa
|
@ -0,0 +1,47 @@
|
||||||
|
/* -*- Mode: Java; tab-width: 4; c-basic-offset: 4; -*-
|
||||||
|
*
|
||||||
|
* The contents of this file are subject to the Netscape Public License
|
||||||
|
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||||
|
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||||
|
* http://www.mozilla.org/NPL/
|
||||||
|
*
|
||||||
|
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||||
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||||
|
* for the specific language governing rights and limitations under the
|
||||||
|
* NPL.
|
||||||
|
*
|
||||||
|
* The Initial Developer of this code under the NPL is Netscape
|
||||||
|
* Communications Corporation. Portions created by Netscape are
|
||||||
|
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||||
|
* Reserved.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// By the time this runs, The 'HTTPIndex' variable will have been
|
||||||
|
// magically set on the global object by the native code.
|
||||||
|
|
||||||
|
function Init()
|
||||||
|
{
|
||||||
|
dump("directory.js: Init()\n");
|
||||||
|
|
||||||
|
// Add the HTTPIndex datasource into the tree
|
||||||
|
var tree = document.getElementById('tree');
|
||||||
|
tree.database.AddDataSource(HTTPIndex.DataSource);
|
||||||
|
|
||||||
|
// Initialize the tree's base URL to whatever the HTTPIndex is rooted at
|
||||||
|
dump("base URL = " + HTTPIndex.BaseURL + "\n");
|
||||||
|
tree.setAttribute('ref', HTTPIndex.BaseURL);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// We need this hack because we've completely circumvented the onload() logic.
|
||||||
|
function Boot()
|
||||||
|
{
|
||||||
|
if (document.getElementById('tree')) {
|
||||||
|
Init();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
setTimeout("Boot()", 500);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
setTimeout("Boot()", 0);
|
|
@ -0,0 +1,55 @@
|
||||||
|
<?xml version="1.0"?> <!-- -*- Mode: SGML -*- -->
|
||||||
|
<!--
|
||||||
|
|
||||||
|
The contents of this file are subject to the Netscape Public License
|
||||||
|
Version 1.0 (the "NPL"); you may not use this file except in
|
||||||
|
compliance with the NPL. You may obtain a copy of the NPL at
|
||||||
|
http://www.mozilla.org/NPL/
|
||||||
|
|
||||||
|
Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||||
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||||
|
for the specific language governing rights and limitations under the
|
||||||
|
NPL.
|
||||||
|
|
||||||
|
The Initial Developer of this code under the NPL is Netscape
|
||||||
|
Communications Corporation. Portions created by Netscape are
|
||||||
|
Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||||
|
Reserved.
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
||||||
|
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
||||||
|
<?xml-stylesheet href="chrome://directory/skin/" type="text/css"?>
|
||||||
|
|
||||||
|
<!DOCTYPE window SYSTEM "chrome://directory/locale/directory.dtd">
|
||||||
|
|
||||||
|
<window
|
||||||
|
title="&directoryWindowTitle.label;"
|
||||||
|
xmlns:html="http://www.w3.org/TR/REC-html40"
|
||||||
|
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||||
|
align="vertical">
|
||||||
|
|
||||||
|
<html:script src="directory.js" />
|
||||||
|
|
||||||
|
<tree id="tree" datasources="rdf:null" flex="1">
|
||||||
|
<template>
|
||||||
|
<treechildren>
|
||||||
|
<treeitem uri="...">
|
||||||
|
<treerow>
|
||||||
|
<treecell><text value="rdf:urn:http-index-format:Filename"/></treecell>
|
||||||
|
<treecell><text value="rdf:urn:http-index-format:Content-Length"/></treecell>
|
||||||
|
<treecell><text value="rdf:urn:http-index-format:Last-Modified"/></treecell>
|
||||||
|
</treerow>
|
||||||
|
</treeitem>
|
||||||
|
</treechildren>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<treehead>
|
||||||
|
<treerow>
|
||||||
|
<treecell>&directoryWindow.filename.label;</treecell>
|
||||||
|
<treecell>&directoryWindow.contentlength.label;</treecell>
|
||||||
|
<treecell>&directoryWindow.lastmodified.label;</treecell>
|
||||||
|
</treerow>
|
||||||
|
</treehead>
|
||||||
|
</tree>
|
||||||
|
</window>
|
|
@ -0,0 +1,4 @@
|
||||||
|
<!ENTITY directoryWindowTitle.label "Directory Contents">
|
||||||
|
<!ENTITY directoryWindow.filename.label "Name">
|
||||||
|
<!ENTITY directoryWindow.contentlength.label "Size">
|
||||||
|
<!ENTITY directoryWindow.lastmodified.label "Last Modified">
|
|
@ -0,0 +1 @@
|
||||||
|
Makefile
|
|
@ -0,0 +1,38 @@
|
||||||
|
#
|
||||||
|
# The contents of this file are subject to the Netscape Public License
|
||||||
|
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||||
|
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||||
|
# http://www.mozilla.org/NPL/
|
||||||
|
#
|
||||||
|
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||||
|
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||||
|
# for the specific language governing rights and limitations under the
|
||||||
|
# NPL.
|
||||||
|
#
|
||||||
|
# The Initial Developer of this code under the NPL is Netscape
|
||||||
|
# Communications Corporation. Portions created by Netscape are
|
||||||
|
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||||
|
# Reserved.
|
||||||
|
#
|
||||||
|
|
||||||
|
DEPTH = ../../../..
|
||||||
|
topsrcdir = @top_srcdir@
|
||||||
|
srcdir = @srcdir@
|
||||||
|
VPATH = @srcdir@
|
||||||
|
|
||||||
|
include $(DEPTH)/config/autoconf.mk
|
||||||
|
|
||||||
|
MODULE = history
|
||||||
|
LIBRARY_NAME = history
|
||||||
|
IS_COMPONENT = 1
|
||||||
|
|
||||||
|
CPPSRCS = nsGlobalHistory.cpp
|
||||||
|
|
||||||
|
EXTRA_DSO_LDOPTS = \
|
||||||
|
-L$(DIST)/bin \
|
||||||
|
-L$(DIST)/lib \
|
||||||
|
-lxpcom \
|
||||||
|
$(NSPR_LIBS) \
|
||||||
|
$(NULL)
|
||||||
|
|
||||||
|
include $(topsrcdir)/config/rules.mk
|
|
@ -0,0 +1,23 @@
|
||||||
|
/* -*- Mode: C; c-basic-offset: 2 -*-
|
||||||
|
*
|
||||||
|
* The contents of this file are subject to the Netscape Public License
|
||||||
|
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||||
|
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||||
|
* http://www.mozilla.org/NPL/
|
||||||
|
*
|
||||||
|
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||||
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||||
|
* for the specific language governing rights and limitations under the
|
||||||
|
* NPL.
|
||||||
|
*
|
||||||
|
* The Initial Developer of this code under the NPL is Netscape
|
||||||
|
* Communications Corporation. Portions created by Netscape are
|
||||||
|
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||||
|
* Reserved.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
|
Style rules specific to the directory listing window.
|
||||||
|
|
||||||
|
*/
|
|
@ -0,0 +1,47 @@
|
||||||
|
/* -*- Mode: Java; tab-width: 4; c-basic-offset: 4; -*-
|
||||||
|
*
|
||||||
|
* The contents of this file are subject to the Netscape Public License
|
||||||
|
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||||
|
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||||
|
* http://www.mozilla.org/NPL/
|
||||||
|
*
|
||||||
|
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||||
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||||
|
* for the specific language governing rights and limitations under the
|
||||||
|
* NPL.
|
||||||
|
*
|
||||||
|
* The Initial Developer of this code under the NPL is Netscape
|
||||||
|
* Communications Corporation. Portions created by Netscape are
|
||||||
|
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||||
|
* Reserved.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// By the time this runs, The 'HTTPIndex' variable will have been
|
||||||
|
// magically set on the global object by the native code.
|
||||||
|
|
||||||
|
function Init()
|
||||||
|
{
|
||||||
|
dump("directory.js: Init()\n");
|
||||||
|
|
||||||
|
// Add the HTTPIndex datasource into the tree
|
||||||
|
var tree = document.getElementById('tree');
|
||||||
|
tree.database.AddDataSource(HTTPIndex.DataSource);
|
||||||
|
|
||||||
|
// Initialize the tree's base URL to whatever the HTTPIndex is rooted at
|
||||||
|
dump("base URL = " + HTTPIndex.BaseURL + "\n");
|
||||||
|
tree.setAttribute('ref', HTTPIndex.BaseURL);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// We need this hack because we've completely circumvented the onload() logic.
|
||||||
|
function Boot()
|
||||||
|
{
|
||||||
|
if (document.getElementById('tree')) {
|
||||||
|
Init();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
setTimeout("Boot()", 500);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
setTimeout("Boot()", 0);
|
|
@ -0,0 +1,55 @@
|
||||||
|
<?xml version="1.0"?> <!-- -*- Mode: SGML -*- -->
|
||||||
|
<!--
|
||||||
|
|
||||||
|
The contents of this file are subject to the Netscape Public License
|
||||||
|
Version 1.0 (the "NPL"); you may not use this file except in
|
||||||
|
compliance with the NPL. You may obtain a copy of the NPL at
|
||||||
|
http://www.mozilla.org/NPL/
|
||||||
|
|
||||||
|
Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||||
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||||
|
for the specific language governing rights and limitations under the
|
||||||
|
NPL.
|
||||||
|
|
||||||
|
The Initial Developer of this code under the NPL is Netscape
|
||||||
|
Communications Corporation. Portions created by Netscape are
|
||||||
|
Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||||
|
Reserved.
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
||||||
|
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
||||||
|
<?xml-stylesheet href="chrome://directory/skin/" type="text/css"?>
|
||||||
|
|
||||||
|
<!DOCTYPE window SYSTEM "chrome://directory/locale/directory.dtd">
|
||||||
|
|
||||||
|
<window
|
||||||
|
title="&directoryWindowTitle.label;"
|
||||||
|
xmlns:html="http://www.w3.org/TR/REC-html40"
|
||||||
|
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||||
|
align="vertical">
|
||||||
|
|
||||||
|
<html:script src="directory.js" />
|
||||||
|
|
||||||
|
<tree id="tree" datasources="rdf:null" flex="1">
|
||||||
|
<template>
|
||||||
|
<treechildren>
|
||||||
|
<treeitem uri="...">
|
||||||
|
<treerow>
|
||||||
|
<treecell><text value="rdf:urn:http-index-format:Filename"/></treecell>
|
||||||
|
<treecell><text value="rdf:urn:http-index-format:Content-Length"/></treecell>
|
||||||
|
<treecell><text value="rdf:urn:http-index-format:Last-Modified"/></treecell>
|
||||||
|
</treerow>
|
||||||
|
</treeitem>
|
||||||
|
</treechildren>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<treehead>
|
||||||
|
<treerow>
|
||||||
|
<treecell>&directoryWindow.filename.label;</treecell>
|
||||||
|
<treecell>&directoryWindow.contentlength.label;</treecell>
|
||||||
|
<treecell>&directoryWindow.lastmodified.label;</treecell>
|
||||||
|
</treerow>
|
||||||
|
</treehead>
|
||||||
|
</tree>
|
||||||
|
</window>
|
|
@ -0,0 +1,4 @@
|
||||||
|
<!ENTITY directoryWindowTitle.label "Directory Contents">
|
||||||
|
<!ENTITY directoryWindow.filename.label "Name">
|
||||||
|
<!ENTITY directoryWindow.contentlength.label "Size">
|
||||||
|
<!ENTITY directoryWindow.lastmodified.label "Last Modified">
|
|
@ -0,0 +1,72 @@
|
||||||
|
#!nmake
|
||||||
|
#
|
||||||
|
# The contents of this file are subject to the Netscape Public License
|
||||||
|
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||||
|
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||||
|
# http://www.mozilla.org/NPL/
|
||||||
|
#
|
||||||
|
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||||
|
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||||
|
# for the specific language governing rights and limitations under the
|
||||||
|
# NPL.
|
||||||
|
#
|
||||||
|
# The Initial Developer of this code under the NPL is Netscape
|
||||||
|
# Communications Corporation. Portions created by Netscape are
|
||||||
|
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||||
|
# Reserved.
|
||||||
|
|
||||||
|
DEPTH=..\..\..
|
||||||
|
|
||||||
|
CHROME_DIR = directory
|
||||||
|
CHROME_CONTENT_DIR = content\default
|
||||||
|
CHROME_SKIN_DIR = skin\default
|
||||||
|
|
||||||
|
CHROME_CONTENT = \
|
||||||
|
.\directory.xul \
|
||||||
|
.\directory.js \
|
||||||
|
$(NULL)
|
||||||
|
|
||||||
|
CHROME_SKIN = \
|
||||||
|
.\directory.css \
|
||||||
|
$(NULL)
|
||||||
|
|
||||||
|
CHROME_L10N = \
|
||||||
|
.\locale\en-US\directory.dtd \
|
||||||
|
$(NULL)
|
||||||
|
|
||||||
|
MODULE=directory
|
||||||
|
|
||||||
|
XPIDLSRCS = \
|
||||||
|
.\nsIHTTPIndex.idl \
|
||||||
|
$(NULL)
|
||||||
|
|
||||||
|
CPPSRCS= \
|
||||||
|
nsDirectoryViewer.cpp \
|
||||||
|
$(NULL)
|
||||||
|
|
||||||
|
CPP_OBJS= \
|
||||||
|
.\$(OBJDIR)\nsDirectoryViewer.obj \
|
||||||
|
$(NULL)
|
||||||
|
|
||||||
|
MAKE_OBJ_TYPE=DLL
|
||||||
|
DLLNAME = directory
|
||||||
|
DLL=.\$(OBJDIR)\$(DLLNAME).dll
|
||||||
|
|
||||||
|
LCFLAGS = \
|
||||||
|
$(LCFLAGS) \
|
||||||
|
$(DEFINES) \
|
||||||
|
$(NULL)
|
||||||
|
|
||||||
|
# These are the libraries we need to link with to create the DLL
|
||||||
|
LLIBS= \
|
||||||
|
$(DIST)\lib\js3250.lib \
|
||||||
|
$(DIST)\lib\neckoutil_s.lib \
|
||||||
|
$(DIST)\lib\xpcom.lib \
|
||||||
|
$(LIBNSPR) \
|
||||||
|
$(NULL)
|
||||||
|
|
||||||
|
include <$(DEPTH)\config\rules.mak>
|
||||||
|
|
||||||
|
install:: $(DLL)
|
||||||
|
$(MAKE_INSTALL) $(DLL) $(DIST)\bin\components
|
||||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,48 @@
|
||||||
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||||
|
*
|
||||||
|
* The contents of this file are subject to the Netscape Public License
|
||||||
|
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||||
|
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||||
|
* http://www.mozilla.org/NPL/
|
||||||
|
*
|
||||||
|
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||||
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||||
|
* for the specific language governing rights and limitations under the
|
||||||
|
* NPL.
|
||||||
|
*
|
||||||
|
* The Initial Developer of this code under the NPL is Netscape
|
||||||
|
* Communications Corporation. Portions created by Netscape are
|
||||||
|
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||||
|
* Reserved.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
|
The interface to an HTTP index
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "nsISupports.idl"
|
||||||
|
|
||||||
|
interface nsIStreamListener;
|
||||||
|
interface nsIRDFDataSource;
|
||||||
|
|
||||||
|
[scriptable, uuid(6F2BDBD0-58C3-11d3-BE36-00104BDE6048)]
|
||||||
|
interface nsIHTTPIndex : nsISupports
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The base URL of the HTTP index
|
||||||
|
*/
|
||||||
|
readonly attribute string BaseURL;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The RDF datasource that contains the HTTP index information.
|
||||||
|
*/
|
||||||
|
readonly attribute nsIRDFDataSource DataSource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a stream listener that can be used to populate the HTTP index.
|
||||||
|
*/
|
||||||
|
nsIStreamListener CreateListener();
|
||||||
|
};
|
||||||
|
|
Загрузка…
Ссылка в новой задаче