Compare commits
27 Commits
jnance_str
...
OUTLINER_F
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e954cf1116 | ||
|
|
0d8142b0a2 | ||
|
|
d4fb3cf9ab | ||
|
|
1fdc0f0fa2 | ||
|
|
5c6c03599a | ||
|
|
19e026463d | ||
|
|
0fb83de596 | ||
|
|
75104078fa | ||
|
|
a379d8f9af | ||
|
|
eee28b8e1c | ||
|
|
434dff1e55 | ||
|
|
e3bfdeecda | ||
|
|
d7bc4d4f7b | ||
|
|
1f74660548 | ||
|
|
4fa71f21f4 | ||
|
|
2e7e05ff18 | ||
|
|
8616c5d21a | ||
|
|
f8a5221f83 | ||
|
|
3ea802f733 | ||
|
|
5a26833bd2 | ||
|
|
f160239413 | ||
|
|
5bb39a1d00 | ||
|
|
f65e9524a4 | ||
|
|
fda2dffa23 | ||
|
|
d6371bb2dc | ||
|
|
0a67200243 | ||
|
|
5153715a35 |
File diff suppressed because it is too large
Load Diff
@@ -1,219 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
* ex: set tabstop=8 softtabstop=2 shiftwidth=2 expandtab:
|
||||
*
|
||||
* 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):
|
||||
*/
|
||||
|
||||
#ifndef nsFontMetricsGTK_h__
|
||||
#define nsFontMetricsGTK_h__
|
||||
|
||||
#include "nsDeviceContextGTK.h"
|
||||
#include "nsIFontMetrics.h"
|
||||
#include "nsIFontEnumerator.h"
|
||||
#include "nsFont.h"
|
||||
#include "nsString.h"
|
||||
#include "nsUnitConversion.h"
|
||||
#include "nsIDeviceContext.h"
|
||||
#include "nsCRT.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsRenderingContextGTK.h"
|
||||
#include "nsICharRepresentable.h"
|
||||
|
||||
#include <gdk/gdk.h>
|
||||
#include <gdk/gdkx.h>
|
||||
|
||||
#undef FONT_HAS_GLYPH
|
||||
#define FONT_HAS_GLYPH(map, char) IS_REPRESENTABLE(map, char)
|
||||
|
||||
typedef struct nsFontCharSetInfo nsFontCharSetInfo;
|
||||
|
||||
typedef gint (*nsFontCharSetConverter)(nsFontCharSetInfo* aSelf,
|
||||
XFontStruct* aFont, const PRUnichar* aSrcBuf, PRInt32 aSrcLen,
|
||||
char* aDestBuf, PRInt32 aDestLen);
|
||||
|
||||
struct nsFontCharSet;
|
||||
struct nsFontFamily;
|
||||
struct nsFontNode;
|
||||
struct nsFontStretch;
|
||||
|
||||
class nsFontGTKUserDefined;
|
||||
class nsFontMetricsGTK;
|
||||
|
||||
class nsFontGTK
|
||||
{
|
||||
public:
|
||||
nsFontGTK();
|
||||
virtual ~nsFontGTK();
|
||||
NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
|
||||
|
||||
void LoadFont(void);
|
||||
PRBool IsEmptyFont(GdkFont*);
|
||||
|
||||
inline int SupportsChar(PRUnichar aChar)
|
||||
{ return mFont && FONT_HAS_GLYPH(mMap, aChar); };
|
||||
|
||||
virtual GdkFont* GetGDKFont(void);
|
||||
virtual PRBool GetGDKFontIs10646(void);
|
||||
virtual gint GetWidth(const PRUnichar* aString, PRUint32 aLength) = 0;
|
||||
virtual gint DrawString(nsRenderingContextGTK* aContext,
|
||||
nsDrawingSurfaceGTK* aSurface, nscoord aX,
|
||||
nscoord aY, const PRUnichar* aString,
|
||||
PRUint32 aLength) = 0;
|
||||
#ifdef MOZ_MATHML
|
||||
// bounding metrics for a string
|
||||
// remember returned values are not in app units
|
||||
// - to emulate GetWidth () above
|
||||
virtual nsresult
|
||||
GetBoundingMetrics(const PRUnichar* aString,
|
||||
PRUint32 aLength,
|
||||
nsBoundingMetrics& aBoundingMetrics) = 0;
|
||||
#endif
|
||||
|
||||
PRUint32* mMap;
|
||||
nsFontCharSetInfo* mCharSetInfo;
|
||||
char* mName;
|
||||
nsFontGTKUserDefined* mUserDefinedFont;
|
||||
PRUint16 mSize;
|
||||
PRInt16 mBaselineAdjust;
|
||||
|
||||
protected:
|
||||
GdkFont* mFont;
|
||||
PRBool mAlreadyCalledLoadFont;
|
||||
};
|
||||
|
||||
class nsFontMetricsGTK : public nsIFontMetrics
|
||||
{
|
||||
public:
|
||||
nsFontMetricsGTK();
|
||||
virtual ~nsFontMetricsGTK();
|
||||
|
||||
NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_IMETHOD Init(const nsFont& aFont, nsIAtom* aLangGroup,
|
||||
nsIDeviceContext* aContext);
|
||||
NS_IMETHOD Destroy();
|
||||
|
||||
NS_IMETHOD GetXHeight(nscoord& aResult);
|
||||
NS_IMETHOD GetSuperscriptOffset(nscoord& aResult);
|
||||
NS_IMETHOD GetSubscriptOffset(nscoord& aResult);
|
||||
NS_IMETHOD GetStrikeout(nscoord& aOffset, nscoord& aSize);
|
||||
NS_IMETHOD GetUnderline(nscoord& aOffset, nscoord& aSize);
|
||||
|
||||
NS_IMETHOD GetHeight(nscoord &aHeight);
|
||||
NS_IMETHOD GetNormalLineHeight(nscoord &aHeight);
|
||||
NS_IMETHOD GetLeading(nscoord &aLeading);
|
||||
NS_IMETHOD GetEmHeight(nscoord &aHeight);
|
||||
NS_IMETHOD GetEmAscent(nscoord &aAscent);
|
||||
NS_IMETHOD GetEmDescent(nscoord &aDescent);
|
||||
NS_IMETHOD GetMaxHeight(nscoord &aHeight);
|
||||
NS_IMETHOD GetMaxAscent(nscoord &aAscent);
|
||||
NS_IMETHOD GetMaxDescent(nscoord &aDescent);
|
||||
NS_IMETHOD GetMaxAdvance(nscoord &aAdvance);
|
||||
NS_IMETHOD GetFont(const nsFont *&aFont);
|
||||
NS_IMETHOD GetLangGroup(nsIAtom** aLangGroup);
|
||||
NS_IMETHOD GetFontHandle(nsFontHandle &aHandle);
|
||||
|
||||
virtual nsresult GetSpaceWidth(nscoord &aSpaceWidth);
|
||||
|
||||
nsFontGTK* FindFont(PRUnichar aChar);
|
||||
nsFontGTK* FindUserDefinedFont(PRUnichar aChar);
|
||||
nsFontGTK* FindStyleSheetSpecificFont(PRUnichar aChar);
|
||||
nsFontGTK* FindStyleSheetGenericFont(PRUnichar aChar);
|
||||
nsFontGTK* FindLangGroupPrefFont(nsIAtom* aLangGroup, PRUnichar aChar);
|
||||
nsFontGTK* FindLangGroupFont(nsIAtom* aLangGroup, PRUnichar aChar, nsCString* aName);
|
||||
nsFontGTK* FindAnyFont(PRUnichar aChar);
|
||||
nsFontGTK* FindSubstituteFont(PRUnichar aChar);
|
||||
|
||||
nsFontGTK* SearchNode(nsFontNode* aNode, PRUnichar aChar);
|
||||
nsFontGTK* TryAliases(nsCString* aName, PRUnichar aChar);
|
||||
nsFontGTK* TryFamily(nsCString* aName, PRUnichar aChar);
|
||||
nsFontGTK* TryNode(nsCString* aName, PRUnichar aChar);
|
||||
nsFontGTK* TryNodes(nsAWritableCString &aFFREName, PRUnichar aChar);
|
||||
nsFontGTK* TryLangGroup(nsIAtom* aLangGroup, nsCString* aName, PRUnichar aChar);
|
||||
|
||||
nsFontGTK* AddToLoadedFontsList(nsFontGTK* aFont);
|
||||
nsFontGTK* PickASizeAndLoad(nsFontStretch* aStretch,
|
||||
nsFontCharSetInfo* aCharSet,
|
||||
PRUnichar aChar,
|
||||
const char *aName);
|
||||
|
||||
static nsresult FamilyExists(const nsString& aFontName);
|
||||
|
||||
//friend struct nsFontGTK;
|
||||
|
||||
nsFontGTK **mLoadedFonts;
|
||||
PRUint16 mLoadedFontsAlloc;
|
||||
PRUint16 mLoadedFontsCount;
|
||||
|
||||
nsFontGTK *mSubstituteFont;
|
||||
|
||||
nsCStringArray mFonts;
|
||||
PRUint16 mFontsIndex;
|
||||
nsVoidArray mFontIsGeneric;
|
||||
|
||||
nsCAutoString mDefaultFont;
|
||||
nsCString *mGeneric;
|
||||
nsCOMPtr<nsIAtom> mLangGroup;
|
||||
nsCAutoString mUserDefined;
|
||||
|
||||
PRUint8 mTriedAllGenerics;
|
||||
PRUint8 mIsUserDefined;
|
||||
|
||||
protected:
|
||||
void RealizeFont();
|
||||
|
||||
nsIDeviceContext *mDeviceContext;
|
||||
nsFont *mFont;
|
||||
nsFontGTK *mWesternFont;
|
||||
|
||||
nscoord mLeading;
|
||||
nscoord mEmHeight;
|
||||
nscoord mEmAscent;
|
||||
nscoord mEmDescent;
|
||||
nscoord mMaxHeight;
|
||||
nscoord mMaxAscent;
|
||||
nscoord mMaxDescent;
|
||||
nscoord mMaxAdvance;
|
||||
nscoord mXHeight;
|
||||
nscoord mSuperscriptOffset;
|
||||
nscoord mSubscriptOffset;
|
||||
nscoord mStrikeoutSize;
|
||||
nscoord mStrikeoutOffset;
|
||||
nscoord mUnderlineSize;
|
||||
nscoord mUnderlineOffset;
|
||||
nscoord mSpaceWidth;
|
||||
|
||||
PRUint16 mPixelSize;
|
||||
PRUint8 mStretchIndex;
|
||||
PRUint8 mStyleIndex;
|
||||
nsFontCharSetConverter mDocConverterType;
|
||||
};
|
||||
|
||||
class nsFontEnumeratorGTK : public nsIFontEnumerator
|
||||
{
|
||||
public:
|
||||
nsFontEnumeratorGTK();
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIFONTENUMERATOR
|
||||
};
|
||||
|
||||
#endif
|
||||
50
mozilla/themes/classic/global/win/filepicker.css
Normal file
50
mozilla/themes/classic/global/win/filepicker.css
Normal file
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* 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-2001 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Joe Hewitt (hewitt@netscape.com)
|
||||
* Brian Ryner (bryner@netscape.com)
|
||||
*/
|
||||
|
||||
/* ===== filepicker.css =================================================
|
||||
== Styles used by the File Picker dialog.
|
||||
======================================================================= */
|
||||
|
||||
@import url("chrome://global/skin/");
|
||||
|
||||
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
|
||||
|
||||
/* ::::: column widths ::::: */
|
||||
|
||||
#FilenameColumn,
|
||||
#ContentLengthColumn,
|
||||
#LastModifiedDateColumn {
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
/* ::::: file/directory items ::::: */
|
||||
|
||||
outlinerbody:-moz-outliner-image(FilenameColumn, directory) {
|
||||
list-style-image: url("chrome://global/skin/filepicker/dir-closed.gif");
|
||||
}
|
||||
|
||||
outlinerbody:-moz-outliner-image(FilenameColumn, file) {
|
||||
list-style-image: url("chrome://global/skin/filepicker/blank.gif");
|
||||
}
|
||||
|
||||
50
mozilla/themes/modern/global/filepicker.css
Normal file
50
mozilla/themes/modern/global/filepicker.css
Normal file
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* 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-2001 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Joe Hewitt (hewitt@netscape.com)
|
||||
* Brian Ryner (bryner@netscape.com)
|
||||
*/
|
||||
|
||||
/* ===== filepicker.css =================================================
|
||||
== Styles used by the File Picker dialog.
|
||||
======================================================================= */
|
||||
|
||||
@import url("chrome://global/skin/");
|
||||
|
||||
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
|
||||
|
||||
/* ::::: column widths ::::: */
|
||||
|
||||
#FilenameColumn,
|
||||
#ContentLengthColumn,
|
||||
#LastModifiedDateColumn {
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
/* ::::: file/directory items ::::: */
|
||||
|
||||
outlinerbody:-moz-outliner-image(FilenameColumn, directory) {
|
||||
list-style-image: url("chrome://global/skin/filepicker/dir-closed.gif");
|
||||
}
|
||||
|
||||
outlinerbody:-moz-outliner-image(FilenameColumn, file) {
|
||||
list-style-image: url("chrome://global/skin/filepicker/blank.gif");
|
||||
}
|
||||
|
||||
@@ -1,134 +0,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/
|
||||
#
|
||||
# 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):
|
||||
#
|
||||
|
||||
DEPTH = ../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = xpcom
|
||||
XPIDL_MODULE = xpcom_ds
|
||||
LIBRARY_NAME = xpcomds_s
|
||||
REQUIRES = unicharutil string
|
||||
|
||||
CSRCS = \
|
||||
pldhash.c \
|
||||
plvector.c \
|
||||
$(NULL)
|
||||
|
||||
CPPSRCS = \
|
||||
nsArena.cpp \
|
||||
nsAtomTable.cpp \
|
||||
nsAtomService.cpp \
|
||||
nsAVLTree.cpp \
|
||||
nsByteBuffer.cpp \
|
||||
nsCRT.cpp \
|
||||
nsConjoiningEnumerator.cpp \
|
||||
nsDeque.cpp \
|
||||
nsEmptyEnumerator.cpp \
|
||||
nsEnumeratorUtils.cpp \
|
||||
nsFixedSizeAllocator.cpp \
|
||||
nsHashtable.cpp \
|
||||
nsHashtableEnumerator.cpp \
|
||||
nsObserver.cpp \
|
||||
nsObserverList.cpp \
|
||||
nsObserverService.cpp \
|
||||
nsProperties.cpp \
|
||||
nsPersistentProperties.cpp \
|
||||
nsQuickSort.cpp \
|
||||
nsSizeOfHandler.cpp \
|
||||
nsStaticNameTable.cpp \
|
||||
nsStatistics.cpp \
|
||||
nsStringMap.cpp \
|
||||
nsSupportsArray.cpp \
|
||||
nsSupportsArrayEnumerator.cpp \
|
||||
nsSupportsPrimitives.cpp \
|
||||
nsUnicharBuffer.cpp \
|
||||
nsVoidArray.cpp \
|
||||
nsVoidBTree.cpp \
|
||||
nsTextFormatter.cpp \
|
||||
nsTimelineService.cpp \
|
||||
$(NULL)
|
||||
|
||||
EXPORTS = \
|
||||
nsAVLTree.h \
|
||||
nsAtomService.h \
|
||||
nsCppSharedAllocator.h \
|
||||
nsCRT.h \
|
||||
nsDeque.h \
|
||||
nsEnumeratorUtils.h \
|
||||
nsFixedSizeAllocator.h \
|
||||
nsHashtable.h \
|
||||
nsHashtableEnumerator.h \
|
||||
nsIArena.h \
|
||||
nsIByteBuffer.h \
|
||||
nsIObserverList.h \
|
||||
nsISimpleEnumerator.h \
|
||||
nsISizeOfHandler.h \
|
||||
nsIUnicharBuffer.h \
|
||||
nsInt64.h \
|
||||
nsQuickSort.h \
|
||||
nsStaticNameTable.h \
|
||||
nsStatistics.h \
|
||||
nsStringMap.h \
|
||||
nsSupportsArray.h \
|
||||
nsSupportsPrimitives.h \
|
||||
nsTime.h \
|
||||
nsUnitConversion.h \
|
||||
nsVector.h \
|
||||
nsVoidArray.h \
|
||||
nsVoidBTree.h \
|
||||
pldhash.h \
|
||||
plvector.h \
|
||||
nsTextFormatter.h \
|
||||
$(NULL)
|
||||
|
||||
XPIDLSRCS = \
|
||||
nsIAtom.idl \
|
||||
nsIAtomService.idl \
|
||||
nsICollection.idl \
|
||||
nsIEnumerator.idl \
|
||||
nsIObserver.idl \
|
||||
nsIObserverService.idl \
|
||||
nsIPersistentProperties2.idl \
|
||||
nsIProperties.idl \
|
||||
nsISerializable.idl \
|
||||
nsIStopwatch.idl \
|
||||
nsISupportsArray.idl \
|
||||
nsISupportsIterators.idl \
|
||||
nsISupportsPrimitives.idl \
|
||||
nsITimelineService.idl \
|
||||
$(NULL)
|
||||
|
||||
EXPORTS := $(addprefix $(srcdir)/, $(EXPORTS))
|
||||
|
||||
# we don't want the shared lib, but we want to force the creation of a static lib.
|
||||
FORCE_STATIC_LIB = 1
|
||||
|
||||
# Force use of PIC
|
||||
FORCE_USE_PIC = 1
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
DEFINES += -D_IMPL_NS_COM -D_IMPL_NS_BASE
|
||||
|
||||
@@ -1,300 +0,0 @@
|
||||
/*
|
||||
* 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 Mozilla Communicator client code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is James L. Nance
|
||||
* Portions created by James L. Nance are Copyright (C) 2001
|
||||
* James L. Nance. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s): Patricia Jewell Nance, Jesse Jacob Nance
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the
|
||||
* terms of the GNU General Public License Version 2 or later (the
|
||||
* "GPL"), in which case the provisions of the GPL are applicable
|
||||
* instead of those above. If you wish to allow use of your
|
||||
* version of this file only under the terms of the GPL and not to
|
||||
* allow others to use your version of this file under the MPL,
|
||||
* indicate your decision by deleting the provisions above and
|
||||
* replace them with the notice and other provisions required by
|
||||
* the GPL. If you do not delete the provisions above, a recipient
|
||||
* may use your version of this file under either the MPL or the
|
||||
* GPL.
|
||||
*/
|
||||
|
||||
// #define TEST_PATRICIA
|
||||
|
||||
#if defined(TEST_PATRICIA)
|
||||
# include "stdlib.h"
|
||||
# include "stdio.h"
|
||||
# include "string.h"
|
||||
# define PRBool bool
|
||||
# define PRUint32 unsigned int
|
||||
# define PRInt32 int
|
||||
# define PR_CALLBACK
|
||||
# define PLArenaPool int
|
||||
# define PL_FinishArenaPool(a)
|
||||
# define PL_InitArenaPool(a, b, c, d)
|
||||
# define PL_ArenaAllocate(a, size) malloc(size)
|
||||
# define PR_TRUE true
|
||||
# define PR_FALSE false
|
||||
|
||||
struct nsCRT {
|
||||
static int strlen(const char *a) {return ::strlen(a);}
|
||||
static int memcmp(const void *a, const void *b, PRUint32 c) {
|
||||
return ::memcmp(a,b,c);
|
||||
}
|
||||
};
|
||||
#else
|
||||
# include "nsCRT.h"
|
||||
#endif
|
||||
|
||||
#include "nsStringMap.h"
|
||||
|
||||
const char nsStringMap::zero_str[] = "\0";
|
||||
|
||||
nsStringMap::~nsStringMap()
|
||||
{
|
||||
// Get rid of the arena memory
|
||||
PL_FinishArenaPool(&mPool);
|
||||
}
|
||||
|
||||
nsStringMap::nsStringMap() : numEntries(0)
|
||||
{
|
||||
// Initialize the head
|
||||
head.l = head.r = &head;
|
||||
head.bit = ~0;
|
||||
head.key = zero_str;
|
||||
head.len = 1;
|
||||
head.obj = 0;
|
||||
|
||||
// Initialize the arena. Guess that a 512 byte block size is good
|
||||
PL_InitArenaPool(&mPool, "nsStringMap", 512, sizeof(void*));
|
||||
}
|
||||
|
||||
void
|
||||
nsStringMap::Reset()
|
||||
{
|
||||
// Initialize the head
|
||||
head.l = head.r = &head;
|
||||
head.bit = ~0;
|
||||
head.key = zero_str;
|
||||
head.len = 1;
|
||||
head.obj = 0;
|
||||
|
||||
// Reinitialize the Arena
|
||||
PL_FinishArenaPool(&mPool);
|
||||
PL_InitArenaPool(&mPool, "nsStringMap", 512, sizeof(void*));
|
||||
}
|
||||
|
||||
void
|
||||
nsStringMap::Reset(nsStringMapEnumFunc destroyFunc, void *aClosure)
|
||||
{
|
||||
Enumerate(destroyFunc, aClosure);
|
||||
Reset();
|
||||
}
|
||||
|
||||
nsStringMap::Patricia *
|
||||
nsStringMap::newNode()
|
||||
{
|
||||
return (Patricia*) PL_ArenaAllocate(&mPool, sizeof(Patricia));
|
||||
}
|
||||
|
||||
nsStringMap::Patricia *
|
||||
nsStringMap::searchDown(BitTester &key)
|
||||
{
|
||||
// The head node only branches to the left, so we can optimize here.
|
||||
Patricia *x = head.l;
|
||||
|
||||
PRUint32 lastBits;
|
||||
|
||||
do {
|
||||
lastBits = x->bit;
|
||||
|
||||
if(key.isset(lastBits))
|
||||
x = x->r;
|
||||
else
|
||||
x = x->l;
|
||||
|
||||
} while(lastBits > x->bit);
|
||||
|
||||
return x;
|
||||
}
|
||||
|
||||
void*
|
||||
nsStringMap::Get(const char *str, PRUint32 slen)
|
||||
{
|
||||
BitTester key(str, slen);
|
||||
|
||||
Patricia *t = searchDown(key);
|
||||
|
||||
if(!key.memcmp(t->key, t->len)) {
|
||||
return t->obj;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void*
|
||||
nsStringMap::Get(const char *str)
|
||||
{
|
||||
BitTester key(str);
|
||||
|
||||
Patricia *t = searchDown(key);
|
||||
|
||||
if(!key.memcmp(t->key, t->len)) {
|
||||
return t->obj;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
PRBool
|
||||
nsStringMap::Put(const char *str, void *obj, PRBool copy)
|
||||
{
|
||||
PRUint32 slen = nsCRT::strlen(str);
|
||||
return Put(str, slen, obj, copy);
|
||||
}
|
||||
|
||||
PRBool
|
||||
nsStringMap::Put(const char *str, PRUint32 slen, void *obj, PRBool copy)
|
||||
{
|
||||
if(copy) {
|
||||
PRUint32 mask = sizeof(double) - 1;
|
||||
PRUint32 asize = (slen+mask) & ~mask;
|
||||
char *tstr = (char*) PL_ArenaAllocate(&mPool, asize);
|
||||
memcpy(tstr, str, slen);
|
||||
str = tstr;
|
||||
}
|
||||
|
||||
BitTester key(str, slen);
|
||||
|
||||
Patricia *t = searchDown(key);
|
||||
|
||||
if(!key.memcmp(t->key, t->len)) {
|
||||
t->obj = obj;
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
||||
// This is somewhat ugly. We need to find the maximum bit position that
|
||||
// differs, but this is complicated by the fact that we have random length
|
||||
// data. Assume that data past the end of the string is 0.
|
||||
const PRUint32 klen = key.datalen();
|
||||
const PRUint32 tlen = t->len;
|
||||
PRUint32 bpos;
|
||||
if(klen>tlen) {
|
||||
bpos = 8 * klen - 1;
|
||||
while(!BitTester::isset_checked(str, bpos)) --bpos;
|
||||
} else if(tlen>klen) {
|
||||
bpos = 8 * tlen - 1;
|
||||
while(!BitTester::isset_checked(t->key, bpos)) --bpos;
|
||||
} else /* equal */ {
|
||||
bpos = 8 * tlen - 1;
|
||||
while(BitTester::bitsequal(t->key, str, bpos)) --bpos;
|
||||
}
|
||||
|
||||
Patricia *p, *x = &head;
|
||||
|
||||
do {
|
||||
p = x;
|
||||
x = key.isset(x->bit) ? x->r : x->l;
|
||||
} while(x->bit > bpos && p->bit > x->bit);
|
||||
|
||||
t = newNode();
|
||||
|
||||
if(!t) {
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
t->key = str;
|
||||
t->len = key.datalen();
|
||||
t->obj = obj;
|
||||
t->bit = bpos;
|
||||
|
||||
if(key.isset(t->bit)) {
|
||||
t->r = t;
|
||||
t->l = x;
|
||||
} else {
|
||||
t->r = x;
|
||||
t->l = t;
|
||||
}
|
||||
|
||||
if(key.isset(p->bit)) {
|
||||
p->r = t;
|
||||
} else {
|
||||
p->l = t;
|
||||
}
|
||||
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
nsStringMap::enumerate_recurse(
|
||||
nsStringMapEnumFunc aEnumFunc, void* aClosure, Patricia *node)
|
||||
{
|
||||
aEnumFunc(node->key, node->obj, aClosure);
|
||||
if(node->l && node->l->bit<node->bit)
|
||||
enumerate_recurse(aEnumFunc, aClosure, node->l);
|
||||
if(node->r && node->r->bit<node->bit)
|
||||
enumerate_recurse(aEnumFunc, aClosure, node->r);
|
||||
}
|
||||
|
||||
void
|
||||
nsStringMap::Enumerate(nsStringMapEnumFunc aEnumFunc, void *aClosure)
|
||||
{
|
||||
// We dont want to process head, its a sentinal
|
||||
if(head.l && head.l->bit<head.bit)
|
||||
enumerate_recurse(aEnumFunc, aClosure, head.l);
|
||||
if(head.r && head.r->bit<head.bit)
|
||||
enumerate_recurse(aEnumFunc, aClosure, head.r);
|
||||
}
|
||||
|
||||
#if defined(TEST_PATRICIA)
|
||||
|
||||
PRBool etest(const char *key, void *data, void *closure)
|
||||
{
|
||||
printf("%s\n", key);
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
nsStringMap map;
|
||||
const char *strings[] = {
|
||||
"I am number 1 string",
|
||||
"I am number 2 string",
|
||||
"I am number 3 string",
|
||||
"a different string",
|
||||
"a similar string",
|
||||
"I am a very long string and I want to make sure we can handle this",
|
||||
"I am a very long string and I want to make sure we can handle this too",
|
||||
0
|
||||
};
|
||||
|
||||
int idx;
|
||||
for(idx=0; strings[idx]; ++idx) {
|
||||
map.Put(strings[idx], (void*)(1+idx));
|
||||
}
|
||||
|
||||
printf("Lookup Test\n");
|
||||
while(--idx>=0) {
|
||||
void *ptr = map.Get(strings[idx]);
|
||||
printf("%d: %s\n", (long)ptr, strings[idx]);
|
||||
}
|
||||
|
||||
printf("\nEnumeration Test\n");
|
||||
|
||||
map.Enumerate(etest, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,112 +0,0 @@
|
||||
#ifndef nsStringMap_h__
|
||||
#define nsStringMap_h__
|
||||
|
||||
/*
|
||||
* 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 Mozilla Communicator client code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is James L. Nance
|
||||
* Portions created by James L. Nance are Copyright (C) 2001
|
||||
* James L. Nance. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s): Patricia Jewell Nance, Jesse Jacob Nance
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the
|
||||
* terms of the GNU General Public License Version 2 or later (the
|
||||
* "GPL"), in which case the provisions of the GPL are applicable
|
||||
* instead of those above. If you wish to allow use of your
|
||||
* version of this file only under the terms of the GPL and not to
|
||||
* allow others to use your version of this file under the MPL,
|
||||
* indicate your decision by deleting the provisions above and
|
||||
* replace them with the notice and other provisions required by
|
||||
* the GPL. If you do not delete the provisions above, a recipient
|
||||
* may use your version of this file under either the MPL or the
|
||||
* GPL.
|
||||
*/
|
||||
|
||||
#if !defined(TEST_PATRICIA)
|
||||
# include "nscore.h"
|
||||
# include "prtypes.h"
|
||||
# include "plarena.h"
|
||||
#endif
|
||||
|
||||
typedef PRBool (*PR_CALLBACK nsStringMapEnumFunc) (
|
||||
const char *aKey, void *aData, void *aClosure);
|
||||
|
||||
class nsStringMap
|
||||
{
|
||||
public:
|
||||
nsStringMap();
|
||||
~nsStringMap();
|
||||
PRBool Put(const char *str, PRUint32 slen, void *obj, PRBool copy=PR_FALSE);
|
||||
PRBool Put(const char *str, void *obj, PRBool copy=PR_FALSE);
|
||||
void* Get(const char *str);
|
||||
void* Get(const char *str, PRUint32 slen);
|
||||
void Reset();
|
||||
void Reset(nsStringMapEnumFunc destroyFunc, void *aClosure = 0);
|
||||
void Enumerate(nsStringMapEnumFunc aEnumFunc, void *aClosure = 0);
|
||||
|
||||
struct Patricia {
|
||||
Patricia *l, *r;
|
||||
PRUint32 bit; // Bit position for l/r comp
|
||||
const char *key;
|
||||
PRUint32 len;
|
||||
void *obj;
|
||||
};
|
||||
|
||||
// The BitTester class is used to test a particular bit position in an
|
||||
// array of characters. It does not assign any special meaning to 0
|
||||
// characters. Bits past the end of the array are treated as 0
|
||||
class BitTester {
|
||||
const PRUint32 slen;
|
||||
const char *cstr;
|
||||
public:
|
||||
BitTester(const char *s) : slen(nsCRT::strlen(s)), cstr(s) {}
|
||||
BitTester(const char *s, PRUint32 l) : slen(l), cstr(s) {}
|
||||
|
||||
PRInt32 memcmp(const char *ostr, PRUint32 olen) {
|
||||
if(olen==slen) {
|
||||
return ::memcmp((void*)cstr, ostr, slen);
|
||||
} else {
|
||||
return olen - slen;
|
||||
}
|
||||
}
|
||||
|
||||
PRUint32 datalen() const {return slen;}
|
||||
|
||||
static PRBool isset_checked(const char *str, PRUint32 idx) {
|
||||
return (str[idx/8] & (1<<(idx & 7))) != 0;
|
||||
}
|
||||
|
||||
static PRBool
|
||||
bitsequal(const char *str1, const char*str2, PRUint32 idx) {
|
||||
return (str1[idx/8] & (1<<(idx&7)))==(str2[idx/8] & (1<<(idx&7)));
|
||||
}
|
||||
|
||||
PRBool isset(PRUint32 idx) {
|
||||
const PRUint32 base = idx/8;
|
||||
if(base>=slen) return 0;
|
||||
return (cstr[base] & (1<<(idx & 7))) != 0;
|
||||
}
|
||||
};
|
||||
|
||||
private:
|
||||
PLArenaPool mPool;
|
||||
Patricia *newNode();
|
||||
Patricia *searchDown(BitTester&);
|
||||
void enumerate_recurse(nsStringMapEnumFunc, void*, Patricia*);
|
||||
Patricia head; // Sentinal node
|
||||
PRInt32 numEntries;
|
||||
static const char zero_str[];
|
||||
};
|
||||
|
||||
#endif
|
||||
463
mozilla/xpfe/components/filepicker/res/content/filepicker.js
Normal file
463
mozilla/xpfe/components/filepicker/res/content/filepicker.js
Normal file
@@ -0,0 +1,463 @@
|
||||
/* -*- Mode: Java; 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 mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape Communications
|
||||
* Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 2000 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Stuart Parmenter <pavlov@netscape.com>
|
||||
* Brian Ryner <bryner@netscape.com>
|
||||
* Jan Varga <varga@utcru.sk>
|
||||
* Peter Annema <disttsc@bart.nl>
|
||||
*/
|
||||
|
||||
const nsIFilePicker = Components.interfaces.nsIFilePicker;
|
||||
const nsIDirectoryServiceProvider = Components.interfaces.nsIDirectoryServiceProvider;
|
||||
const nsIDirectoryServiceProvider_CONTRACTID = "@mozilla.org/file/directory_service;1";
|
||||
const nsStdURL_CONTRACTID = "@mozilla.org/network/standard-url;1";
|
||||
const nsIFileURL = Components.interfaces.nsIFileURL;
|
||||
const nsIOutlinerBoxObject = Components.interfaces.nsIOutlinerBoxObject;
|
||||
|
||||
var sfile = Components.classes[nsLocalFile_CONTRACTID].createInstance(nsILocalFile);
|
||||
var retvals;
|
||||
var filePickerMode;
|
||||
var dirHistory;
|
||||
var homeDir;
|
||||
var outlinerView;
|
||||
|
||||
var textInput;
|
||||
var okButton;
|
||||
|
||||
var gFilePickerBundle;
|
||||
|
||||
function filepickerLoad() {
|
||||
gFilePickerBundle = document.getElementById("bundle_filepicker");
|
||||
|
||||
dirHistory = new Array();
|
||||
|
||||
textInput = document.getElementById("textInput");
|
||||
okButton = document.getElementById("ok");
|
||||
outlinerView = new nsFileView();
|
||||
outlinerView.selectionCallback = onSelect;
|
||||
|
||||
if (window.arguments) {
|
||||
var o = window.arguments[0];
|
||||
retvals = o.retvals; /* set this to a global var so we can set return values */
|
||||
const title = o.title;
|
||||
filePickerMode = o.mode;
|
||||
if (o.displayDirectory) {
|
||||
const directory = o.displayDirectory.unicodePath;
|
||||
}
|
||||
const initialText = o.defaultString;
|
||||
const filterTitles = o.filters.titles;
|
||||
const filterTypes = o.filters.types;
|
||||
const numFilters = filterTitles.length;
|
||||
|
||||
window.title = title;
|
||||
|
||||
if (initialText) {
|
||||
textInput.value = initialText;
|
||||
}
|
||||
}
|
||||
|
||||
if ((filePickerMode == nsIFilePicker.modeOpen) ||
|
||||
(filePickerMode == nsIFilePicker.modeSave)) {
|
||||
|
||||
window.setCursor("wait");
|
||||
outlinerView.setFilter(filterTypes[0]);
|
||||
window.setCursor("auto");
|
||||
|
||||
/* build filter popup */
|
||||
var filterPopup = document.createElement("menupopup");
|
||||
|
||||
for (var i = 0; i < numFilters; i++) {
|
||||
var menuItem = document.createElement("menuitem");
|
||||
menuItem.setAttribute("label", filterTitles[i] + " (" + filterTypes[i] + ")");
|
||||
menuItem.setAttribute("filters", filterTypes[i]);
|
||||
filterPopup.appendChild(menuItem);
|
||||
}
|
||||
|
||||
var filterMenuList = document.getElementById("filterMenuList");
|
||||
filterMenuList.appendChild(filterPopup);
|
||||
if (numFilters > 0)
|
||||
filterMenuList.selectedIndex = 0;
|
||||
var filterBox = document.getElementById("filterBox");
|
||||
filterBox.removeAttribute("hidden");
|
||||
} else if (filePickerMode == nsIFilePicker.modeGetFolder) {
|
||||
outlinerView.showOnlyDirectories = true;
|
||||
}
|
||||
|
||||
// start out with a filename sort
|
||||
handleColumnClick("FilenameColumn");
|
||||
|
||||
try {
|
||||
var buttonLabel;
|
||||
switch (filePickerMode) {
|
||||
case nsIFilePicker.modeOpen:
|
||||
buttonLabel = gFilePickerBundle.getString("openButtonLabel");
|
||||
break;
|
||||
case nsIFilePicker.modeSave:
|
||||
buttonLabel = gFilePickerBundle.getString("saveButtonLabel");
|
||||
break;
|
||||
case nsIFilePicker.modeGetFolder:
|
||||
buttonLabel = gFilePickerBundle.getString("selectFolderButtonLabel");
|
||||
break;
|
||||
}
|
||||
|
||||
if (buttonLabel) {
|
||||
okButton.setAttribute("label", buttonLabel);
|
||||
}
|
||||
} catch (exception) {
|
||||
// keep it set to "OK"
|
||||
}
|
||||
|
||||
// setup the dialogOverlay.xul button handlers
|
||||
doSetOKCancel(onOK, onCancel);
|
||||
|
||||
// get the home dir
|
||||
var dirServiceProvider = Components.classes[nsIDirectoryServiceProvider_CONTRACTID]
|
||||
.getService(nsIDirectoryServiceProvider);
|
||||
var persistent = new Object();
|
||||
homeDir = dirServiceProvider.getFile("Home", persistent);
|
||||
|
||||
if (directory) {
|
||||
sfile.initWithUnicodePath(directory);
|
||||
}
|
||||
if (!directory || !(sfile.exists() && sfile.isDirectory())) {
|
||||
// Start in the user's home directory
|
||||
sfile.initWithUnicodePath(homeDir.unicodePath);
|
||||
}
|
||||
|
||||
retvals.buttonStatus = nsIFilePicker.returnCancel;
|
||||
|
||||
gotoDirectory(sfile);
|
||||
var outliner = document.getElementById("directoryOutliner");
|
||||
outliner.outlinerBoxObject.view = outlinerView;
|
||||
|
||||
doEnabling();
|
||||
textInput.focus();
|
||||
}
|
||||
|
||||
function onFilterChanged(target)
|
||||
{
|
||||
var filterTypes = target.getAttribute("filters");
|
||||
window.setCursor("wait");
|
||||
outlinerView.setFilter(filterTypes);
|
||||
window.setCursor("auto");
|
||||
}
|
||||
|
||||
function onOK()
|
||||
{
|
||||
var errorTitle, errorMessage, promptService;
|
||||
var ret = nsIFilePicker.returnCancel;
|
||||
|
||||
var isDir = false;
|
||||
var isFile = false;
|
||||
|
||||
var input = textInput.value;
|
||||
if (input[0] == '~') // XXX XP?
|
||||
input = homeDir.unicodePath + input.substring(1);
|
||||
|
||||
var file = sfile.clone().QueryInterface(nsILocalFile);
|
||||
if (!file)
|
||||
return false;
|
||||
|
||||
/* XXX we need an XP way to test for an absolute path! */
|
||||
if (input[0] == '/') /* an absolute path was entered */
|
||||
file.initWithUnicodePath(input);
|
||||
else {
|
||||
try {
|
||||
file.appendRelativeUnicodePath(input);
|
||||
} catch (e) {
|
||||
dump("Can't append relative path '"+input+"':\n");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!file.exists() && (filePickerMode != nsIFilePicker.modeSave)) {
|
||||
errorTitle = gFilePickerBundle.getFormattedString("errorOpenFileDoesntExistTitle",
|
||||
[file.unicodePath]);
|
||||
errorMessage = gFilePickerBundle.getFormattedString("errorOpenFileDoesntExistMessage",
|
||||
[file.unicodePath]);
|
||||
promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
|
||||
.getService(Components.interfaces.nsIPromptService);
|
||||
promptService.alert(window, errorTitle, errorMessage);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (file.exists()) {
|
||||
isDir = file.isDirectory();
|
||||
isFile = file.isFile();
|
||||
}
|
||||
|
||||
switch(filePickerMode) {
|
||||
case nsIFilePicker.modeOpen:
|
||||
if (isFile) {
|
||||
retvals.directory = file.parent.unicodePath;
|
||||
ret = nsIFilePicker.returnOK;
|
||||
} else if (isDir) {
|
||||
if (!sfile.equals(file)) {
|
||||
gotoDirectory(file);
|
||||
}
|
||||
textInput.value = "";
|
||||
doEnabling();
|
||||
ret = nsIFilePicker.returnCancel;
|
||||
}
|
||||
break;
|
||||
case nsIFilePicker.modeSave:
|
||||
if (isFile) { // can only be true if file.exists()
|
||||
// we need to pop up a dialog asking if you want to save
|
||||
var message = gFilePickerBundle.getFormattedString("confirmFileReplacing",
|
||||
[file.unicodePath]);
|
||||
var rv = window.confirm(message);
|
||||
if (rv) {
|
||||
ret = nsIFilePicker.returnReplace;
|
||||
retvals.directory = file.parent.unicodePath;
|
||||
} else {
|
||||
ret = nsIFilePicker.returnCancel;
|
||||
}
|
||||
} else if (isDir) {
|
||||
if (!sfile.equals(file)) {
|
||||
gotoDirectory(file);
|
||||
}
|
||||
textInput.value = "";
|
||||
doEnabling();
|
||||
ret = nsIFilePicker.returnCancel;
|
||||
} else {
|
||||
var parent = file.parent;
|
||||
if (parent.exists() && parent.isDirectory()) {
|
||||
ret = nsIFilePicker.returnOK;
|
||||
retvals.directory = parent.unicodePath;
|
||||
} else {
|
||||
var oldParent = parent;
|
||||
while (!parent.exists()) {
|
||||
oldParent = parent;
|
||||
parent = parent.parent;
|
||||
}
|
||||
errorTitle = gFilePickerBundle.getFormattedString("errorSavingFileTitle",
|
||||
[file.unicodePath]);
|
||||
if (parent.isFile()) {
|
||||
errorMessage = gFilePickerBundle.getFormattedString("saveParentIsFileMessage",
|
||||
[parent.unicodePath, file.unicodePath]);
|
||||
} else {
|
||||
errorMessage = gFilePickerBundle.getFormattedString("saveParentDoesntExistMessage",
|
||||
[oldParent.unicodePath, file.unicodePath]);
|
||||
}
|
||||
promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
|
||||
.getService(Components.interfaces.nsIPromptService);
|
||||
promptService.alert(window, errorTitle, errorMessage);
|
||||
ret = nsIFilePicker.returnCancel;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case nsIFilePicker.modeGetFolder:
|
||||
if (isDir) {
|
||||
retvals.directory = file.parent.unicodePath;
|
||||
} else { // if nothing selected, the current directory will be fine
|
||||
retvals.directory = sfile.unicodePath;
|
||||
}
|
||||
ret = nsIFilePicker.returnOK;
|
||||
break;
|
||||
}
|
||||
|
||||
retvals.file = file;
|
||||
retvals.buttonStatus = ret;
|
||||
|
||||
if (ret == nsIFilePicker.returnCancel)
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
}
|
||||
|
||||
function onCancel()
|
||||
{
|
||||
// Close the window.
|
||||
retvals.buttonStatus = nsIFilePicker.returnCancel;
|
||||
retvals.file = null;
|
||||
return true;
|
||||
}
|
||||
|
||||
function onDblClick(e) {
|
||||
var t = e.originalTarget;
|
||||
if (t.localName != "outlinerbody")
|
||||
return;
|
||||
|
||||
var file = outlinerView.getSelectedFile();
|
||||
if (!file)
|
||||
return;
|
||||
|
||||
if (file.isSymlink()) {
|
||||
var targetFile = Components.classes[nsLocalFile_CONTRACTID].createInstance(nsILocalFile);
|
||||
targetFile.initWithUnicodePath(file.unicodeTarget);
|
||||
file = targetFile;
|
||||
}
|
||||
|
||||
if (file.isDirectory()) {
|
||||
gotoDirectory(file);
|
||||
}
|
||||
else if (file.isFile()) {
|
||||
doOKButton();
|
||||
}
|
||||
}
|
||||
|
||||
function onClick(e) {
|
||||
var t = e.originalTarget;
|
||||
if (t.localName == "outlinercol")
|
||||
handleColumnClick(t.id);
|
||||
}
|
||||
|
||||
function convertColumnIDtoSortType(columnID) {
|
||||
var sortKey;
|
||||
|
||||
switch (columnID) {
|
||||
case "FilenameColumn":
|
||||
sortKey = nsFileView.SORTTYPE_NAME;
|
||||
break;
|
||||
case "FileSizeColumn":
|
||||
sortKey = nsFileView.SORTTYPE_SIZE;
|
||||
break;
|
||||
case "LastModifiedColumn":
|
||||
sortKey = nsFileView.SORTTYPE_DATE;
|
||||
break;
|
||||
default:
|
||||
dump("unsupported sort column: " + columnID + "\n");
|
||||
sortKey = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
return sortKey;
|
||||
}
|
||||
|
||||
function handleColumnClick(columnID) {
|
||||
var sortType = convertColumnIDtoSortType(columnID);
|
||||
var sortOrder = (outlinerView.sortType == sortType) ? !outlinerView.reverseSort : false;
|
||||
outlinerView.sort(sortType, sortOrder, false);
|
||||
|
||||
// set the sort indicator on the column we are sorted by
|
||||
var sortedColumn = document.getElementById(columnID);
|
||||
if (outlinerView.reverseSort) {
|
||||
sortedColumn.setAttribute("sortDirection", "descending");
|
||||
} else {
|
||||
sortedColumn.setAttribute("sortDirection", "ascending");
|
||||
}
|
||||
|
||||
// remove the sort indicator from the rest of the columns
|
||||
var currCol = document.getElementById("directoryOutliner").firstChild;
|
||||
while (currCol) {
|
||||
while (currCol && currCol.localName != "outlinercol")
|
||||
currCol = currCol.nextSibling;
|
||||
if (currCol) {
|
||||
if (currCol != sortedColumn) {
|
||||
currCol.removeAttribute("sortDirection");
|
||||
}
|
||||
currCol = currCol.nextSibling;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function doSort(sortType) {
|
||||
outlinerView.sort(sortType, false);
|
||||
}
|
||||
|
||||
function onKeypress(e) {
|
||||
if (e.keyCode == 8) /* backspace */
|
||||
goUp();
|
||||
}
|
||||
|
||||
function doEnabling() {
|
||||
// Maybe add check if textInput.value would resolve to an existing
|
||||
// file or directory in .modeOpen. Too costly I think.
|
||||
var enable = (textInput.value != "");
|
||||
|
||||
okButton.disabled = !enable;
|
||||
}
|
||||
|
||||
function onSelect(file) {
|
||||
var path = file.unicodeLeafName;
|
||||
|
||||
if (path) {
|
||||
if ((filePickerMode == nsIFilePicker.modeGetFolder) || file.isFile()) {
|
||||
textInput.value = path;
|
||||
doEnabling();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function onDirectoryChanged(target)
|
||||
{
|
||||
var path = target.getAttribute("label");
|
||||
|
||||
var file = Components.classes[nsLocalFile_CONTRACTID].createInstance(nsILocalFile);
|
||||
file.initWithUnicodePath(path);
|
||||
|
||||
if (!sfile.equals(file)) {
|
||||
gotoDirectory(file);
|
||||
}
|
||||
}
|
||||
|
||||
function addToHistory(directoryName) {
|
||||
var found = false;
|
||||
var i = 0;
|
||||
while (!found && i<dirHistory.length) {
|
||||
if (dirHistory[i] == directoryName)
|
||||
found = true;
|
||||
else
|
||||
i++;
|
||||
}
|
||||
|
||||
if (found) {
|
||||
if (i!=0) {
|
||||
dirHistory.splice(i, 1);
|
||||
dirHistory.splice(0, 0, directoryName);
|
||||
}
|
||||
} else {
|
||||
dirHistory.splice(0, 0, directoryName);
|
||||
}
|
||||
|
||||
var menu = document.getElementById("lookInMenu");
|
||||
|
||||
var children = menu.childNodes;
|
||||
for (i=0; i < children.length; i++)
|
||||
menu.removeChild(children[i]);
|
||||
|
||||
for (i=0; i < dirHistory.length; i++) {
|
||||
var menuItem = document.createElement("menuitem");
|
||||
menuItem.setAttribute("label", dirHistory[i]);
|
||||
menu.appendChild(menuItem);
|
||||
}
|
||||
|
||||
var menuList = document.getElementById("lookInMenuList");
|
||||
menuList.selectedIndex = 0;
|
||||
}
|
||||
|
||||
function goUp() {
|
||||
try {
|
||||
var parent = sfile.parent;
|
||||
} catch(ex) { dump("can't get parent directory\n"); }
|
||||
|
||||
if (parent) {
|
||||
gotoDirectory(parent);
|
||||
}
|
||||
}
|
||||
|
||||
function gotoDirectory(directory) {
|
||||
addToHistory(directory.unicodePath);
|
||||
window.setCursor("wait");
|
||||
outlinerView.setDirectory(directory.unicodePath);
|
||||
window.setCursor("auto");
|
||||
sfile = directory;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
<?xml version="1.0"?> <!-- -*- Mode: HTML -*- -->
|
||||
|
||||
<!--
|
||||
- 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 mozilla.org code.
|
||||
|
||||
- The Initial Developer of the Original Code is Netscape
|
||||
- Communications Corporation. Portions created by Netscape are
|
||||
- Copyright (C) 2000 Netscape Communications Corporation.
|
||||
- All Rights Reserved.
|
||||
|
||||
- Contributor(s):
|
||||
- Stuart Parmenter <pavlov@netscape.com>
|
||||
- Brian Ryner <bryner@netscape.com>
|
||||
- Jan Varga <varga@utcru.sk>
|
||||
- Peter Annema <disttsc@bart.nl>
|
||||
-->
|
||||
|
||||
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://global/skin/filepicker.css" type="text/css"?>
|
||||
|
||||
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
|
||||
|
||||
<!DOCTYPE window SYSTEM "chrome://global/locale/filepicker.dtd" >
|
||||
|
||||
<window id="main-window"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:nc="http://home.netscape.com/NC-rdf#"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
orient="vertical"
|
||||
onload="filepickerLoad();"
|
||||
width="426" height="300"
|
||||
class="dialog"
|
||||
persist="screenX screenY">
|
||||
|
||||
<stringbundle id="bundle_filepicker" src="chrome://global/locale/filepicker.properties"/>
|
||||
<script type="application/x-javascript" src="chrome://global/content/nsFileView.js"/>
|
||||
<script type="application/x-javascript" src="chrome://global/content/filepicker.js"/>
|
||||
<keyset id="dialogKeys"/>
|
||||
|
||||
<box autostretch="never">
|
||||
<text value="&lookInMenuList.label;"/>
|
||||
<menulist id="lookInMenuList" flex="1" oncommand="onDirectoryChanged(event.target);" crop="left">
|
||||
<menupopup id="lookInMenu"/>
|
||||
</menulist>
|
||||
<button label=".." oncommand="goUp();"/>
|
||||
</box>
|
||||
|
||||
<box flex="1">
|
||||
<outliner id="directoryOutliner" flex="1" onclick="onClick(event);"
|
||||
ondblclick="onDblClick(event);">
|
||||
<outlinercol id="FilenameColumn" label="&name.label;" flex="1"
|
||||
class="outlinercol-header outlinercell-inset-header sortDirectionIndicator"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<outlinercol id="FileSizeColumn" label="&size.label;" flex="1"
|
||||
class="outlinercol-header outlinercell-inset-header sortDirectionIndicator"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<outlinercol id="LastModifiedColumn" label="&lastModified.label;" flex="1"
|
||||
class="outlinercol-header outlinercell-inset-header sortDirectionIndicator"/>
|
||||
|
||||
<outlinerbody flex="1" onselect="this.parentNode.outlinerBoxObject.view.selectionChanged()"/>
|
||||
</outliner>
|
||||
</box>
|
||||
|
||||
<grid style="margin-top: 5px">
|
||||
<columns>
|
||||
<column/>
|
||||
<column flex="1"/>
|
||||
</columns>
|
||||
|
||||
<rows>
|
||||
<row>
|
||||
<text value="&textInput.label;"/>
|
||||
<textbox id="textInput" flex="1" oninput="doEnabling()"/>
|
||||
</row>
|
||||
<row id="filterBox" hidden="true">
|
||||
<text value="&filterMenuList.label;"/>
|
||||
<menulist id="filterMenuList" flex="1" oncommand="onFilterChanged(event.target);"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
|
||||
<box id="okCancelButtons"/>
|
||||
|
||||
</window>
|
||||
34
mozilla/xpfe/components/filepicker/res/content/makefile.win
Normal file
34
mozilla/xpfe/components/filepicker/res/content/makefile.win
Normal file
@@ -0,0 +1,34 @@
|
||||
#!gmake
|
||||
#
|
||||
# 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):
|
||||
|
||||
DEPTH=..\..\..\..\..
|
||||
|
||||
CHROME_DIR = packages\widget-toolkit
|
||||
CHROME_CONTENT_DIR = global\content
|
||||
|
||||
CHROME_CONTENT = \
|
||||
.\filepicker.xul \
|
||||
.\filepicker.js \
|
||||
.\filepicker.css \
|
||||
$(NULL)
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
469
mozilla/xpfe/components/filepicker/res/content/nsFileView.js
Normal file
469
mozilla/xpfe/components/filepicker/res/content/nsFileView.js
Normal file
@@ -0,0 +1,469 @@
|
||||
/* -*- Mode: Java; 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 mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 2000 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Brian Ryner <bryner@netscape.com>
|
||||
*
|
||||
*/
|
||||
|
||||
/* This file implements an nsIOutlinerView for the filepicker */
|
||||
|
||||
const nsILocalFile = Components.interfaces.nsILocalFile;
|
||||
const nsLocalFile_CONTRACTID = "@mozilla.org/file/local;1";
|
||||
const nsIFile = Components.interfaces.nsIFile;
|
||||
const nsIScriptableDateFormat = Components.interfaces.nsIScriptableDateFormat;
|
||||
const nsScriptableDateFormat_CONTRACTID = "@mozilla.org/intl/scriptabledateformat;1";
|
||||
const nsIAtomService = Components.interfaces.nsIAtomService;
|
||||
const nsAtomService_CONTRACTID = "@mozilla.org/atom-service;1";
|
||||
|
||||
var gDateService = null;
|
||||
|
||||
function numMatchingChars(str1, str2) {
|
||||
var minLength = Math.min(str1.length, str2.length);
|
||||
for (var i = 0; ((i < minLength) && (str1[i] == str2[i])); i++);
|
||||
return i;
|
||||
}
|
||||
|
||||
function sortFilename(a, b) {
|
||||
if (a.cachedName < b.cachedName) {
|
||||
return -1;
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
function sortSize(a, b) {
|
||||
if (a.cachedSize < b.cachedSize) {
|
||||
return -1;
|
||||
} else if (a.cachedSize > b.cachedSize) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
function sortDate(a, b) {
|
||||
if (a.cachedDate < b.cachedDate) {
|
||||
return -1;
|
||||
} else if (a.cachedDate > b.cachedDate) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
function nsFileView() {
|
||||
this.mShowHiddenFiles = false;
|
||||
this.mDirectoryFilter = false;
|
||||
this.mFileList = [];
|
||||
this.mDirList = [];
|
||||
this.mFilteredFiles = [];
|
||||
this.mCurrentFilter = ".*";
|
||||
this.mSelectionCallback = null;
|
||||
this.mOutliner = null;
|
||||
this.mReverseSort = false;
|
||||
this.mSortType = 0;
|
||||
this.mTotalRows = 0;
|
||||
|
||||
if (!gDateService) {
|
||||
gDateService = Components.classes[nsScriptableDateFormat_CONTRACTID]
|
||||
.getService(nsIScriptableDateFormat);
|
||||
}
|
||||
|
||||
var atomService = Components.classes[nsAtomService_CONTRACTID]
|
||||
.getService(nsIAtomService);
|
||||
this.mDirectoryAtom = atomService.getAtom("directory");
|
||||
this.mFileAtom = atomService.getAtom("file");
|
||||
}
|
||||
|
||||
nsFileView.prototype = {
|
||||
|
||||
SORTTYPE_NAME: 1,
|
||||
SORTTYPE_SIZE: 2,
|
||||
SORTTYPE_DATE: 3,
|
||||
|
||||
/* readonly attribute long rowCount; */
|
||||
set rowCount(c) { throw "readonly property"; },
|
||||
get rowCount() { return this.mTotalRows; },
|
||||
|
||||
/* attribute nsIOutlinerSelection selection; */
|
||||
set selection(s) { this.mSelection = s; },
|
||||
get selection() { return this.mSelection; },
|
||||
|
||||
set selectionCallback(f) { this.mSelectionCallback = f; },
|
||||
get selectionCallback() { return this.mSelectionCallback; },
|
||||
|
||||
/* nsISupports methods */
|
||||
|
||||
/* void QueryInterface(in nsIIDRef uuid,
|
||||
[iid_is(uuid),retval] out nsQIResult result); */
|
||||
QueryInterface: function(iid) {
|
||||
if (!iid.equals(nsIOutlinerView) &&
|
||||
!iid.equals(nsISupports)) {
|
||||
throw Components.results.NS_ERROR_NO_INTERFACE;
|
||||
}
|
||||
return this;
|
||||
},
|
||||
|
||||
/* nsIOutlinerView methods */
|
||||
|
||||
/* void getRowProperties(in long index, in nsISupportsArray properties); */
|
||||
getRowProperties: function(index, properties) { },
|
||||
|
||||
/* void getCellProperties(in long row, in wstring colID, in nsISupportsArray properties); */
|
||||
getCellProperties: function(row, colID, properties) {
|
||||
if (row < this.mDirList.length)
|
||||
properties.AppendElement(this.mDirectoryAtom);
|
||||
else if ((row - this.mDirList.length) < this.mFilteredFiles.length)
|
||||
properties.AppendElement(this.mFileAtom);
|
||||
},
|
||||
|
||||
/* void getColumnProperties(in wstring colID, in nsIDOMElement colElt,
|
||||
in nsISupportsArray properties); */
|
||||
getColumnProperties: function(colID, colElt, properties) { },
|
||||
|
||||
/* boolean isContainer(in long index); */
|
||||
isContainer: function(index) { return false; },
|
||||
|
||||
/* boolean isContainerOpen(in long index); */
|
||||
isContainerOpen: function(index) { return false;},
|
||||
|
||||
/* boolean isContainerEmpty(in long index); */
|
||||
isContainerEmpty: function(index) { return false; },
|
||||
|
||||
/* boolean isSorted (); */
|
||||
isSorted: function() { return (this.mSortType > 0); },
|
||||
|
||||
/* boolean canDropOn (in long index); */
|
||||
canDropOn: function(index) { return false; },
|
||||
|
||||
/* boolean canDropBeforeAfter (in long index, in boolean before); */
|
||||
canDropBeforeAfter: function(index, before) { return false; },
|
||||
|
||||
/* void drop (in long row, in long orientation); */
|
||||
drop: function(row, orientation) { },
|
||||
|
||||
/* long getParentIndex(in long rowIndex); */
|
||||
getParentIndex: function(rowIndex) { return -1; },
|
||||
|
||||
/* boolean hasNextSibling(in long rowIndex, in long afterIndex); */
|
||||
hasNextSibling: function(rowIndex, afterIndex) {
|
||||
return (afterIndex < (this.mTotalRows - 1));
|
||||
},
|
||||
|
||||
/* long getLevel(in long index); */
|
||||
getLevel: function(index) { return 0; },
|
||||
|
||||
/* wstring getCellText(in long row, in wstring colID); */
|
||||
getCellText: function(row, colID) {
|
||||
/* we cache the file size and last modified dates -
|
||||
this function must be very fast since it's called
|
||||
whenever the cell needs repainted */
|
||||
var file, isdir = false;
|
||||
if (row < this.mDirList.length) {
|
||||
isdir = true;
|
||||
file = this.mDirList[row];
|
||||
} else if ((row - this.mDirList.length) < this.mFilteredFiles.length) {
|
||||
file = this.mFilteredFiles[row - this.mDirList.length];
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
|
||||
if (colID == "FilenameColumn") {
|
||||
if (!("cachedName" in file)) {
|
||||
file.cachedName = file.file.unicodeLeafName;
|
||||
}
|
||||
return file.cachedName;
|
||||
} else if (colID == "LastModifiedColumn") {
|
||||
if (!("cachedDate" in file)) {
|
||||
// perhaps overkill, but lets get the right locale handling
|
||||
var modDate = new Date(file.file.lastModificationDate);
|
||||
file.cachedDate = gDateService.FormatDateTime("", gDateService.dateFormatShort,
|
||||
gDateService.timeFormatSeconds,
|
||||
modDate.getFullYear(), modDate.getMonth()+1,
|
||||
modDate.getDate(), modDate.getHours(),
|
||||
modDate.getMinutes(), modDate.getSeconds());
|
||||
}
|
||||
return file.cachedDate;
|
||||
} else if (colID == "FileSizeColumn") {
|
||||
if (isdir) {
|
||||
return "";
|
||||
} else {
|
||||
if (!("cachedSize" in file)) {
|
||||
file.cachedSize = String(file.file.fileSize);
|
||||
}
|
||||
}
|
||||
return file.cachedSize;
|
||||
}
|
||||
return "";
|
||||
},
|
||||
|
||||
/* void setOutliner(in nsIOutlinerBoxObject outliner); */
|
||||
setOutliner: function(outliner) { this.mOutliner = outliner; },
|
||||
|
||||
/* void toggleOpenState(in long index); */
|
||||
toggleOpenState: function(index) { },
|
||||
|
||||
/* void cycleHeader(in wstring colID, in nsIDOMElement elt); */
|
||||
cycleHeader: function(colID, elt) { },
|
||||
|
||||
/* void selectionChanged(); */
|
||||
selectionChanged: function() {
|
||||
if (this.mSelectionCallback && this.mSelection.currentIndex > 0) {
|
||||
var file;
|
||||
if (this.mSelection.currentIndex < this.mDirList.length) {
|
||||
file = this.mDirList[this.mSelection.currentIndex].file;
|
||||
} else if ((this.mSelection.currentIndex - this.mDirList.length) < this.mFilteredFiles.length) {
|
||||
file = this.mFilteredFiles[this.mSelection.currentIndex - this.mDirList.length].file;
|
||||
}
|
||||
|
||||
if (file) {
|
||||
this.mSelectionCallback(file);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/* void cycleCell(in long row, in wstring colID); */
|
||||
cycleCell: function(row, colID) { },
|
||||
|
||||
/* boolean isEditable(in long row, in wstring colID); */
|
||||
isEditable: function(row, colID) { return false; },
|
||||
|
||||
/* void setCellText(in long row, in wstring colID, in wstring value); */
|
||||
setCellText: function(row, colID, value) { },
|
||||
|
||||
/* void performAction(in wstring action); */
|
||||
performAction: function(action) { },
|
||||
|
||||
/* void performActionOnRow(in wstring action, in long row); */
|
||||
performActionOnRow: function(action, row) { },
|
||||
|
||||
/* void performActionOnCell(in wstring action, in long row, in wstring colID); */
|
||||
performActionOnCell: function(action, row, colID) { },
|
||||
|
||||
/* private attributes */
|
||||
|
||||
/* attribute boolean showHiddenFiles */
|
||||
set showHiddenFiles(s) {
|
||||
this.mShowHiddenFiles = s;
|
||||
this.setDirectory(this.mDirectoryPath);
|
||||
},
|
||||
|
||||
get showHiddenFiles() { return this.mShowHiddenFiles; },
|
||||
|
||||
/* attribute boolean showOnlyDirectories */
|
||||
set showOnlyDirectories(s) {
|
||||
this.mDirectoryFilter = s;
|
||||
this.filterFiles();
|
||||
},
|
||||
|
||||
get showOnlyDirectories() { return this.mDirectoryFilter; },
|
||||
|
||||
/* readonly attribute short sortType */
|
||||
set sortType(s) { throw "readonly property"; },
|
||||
get sortType() { return this.mSortType; },
|
||||
|
||||
/* readonly attribute boolean reverseSort */
|
||||
set reverseSort(s) { throw "readonly property"; },
|
||||
get reverseSort() { return this.mReverseSort; },
|
||||
|
||||
/* private methods */
|
||||
sort: function(sortType, reverseSort, forceSort) {
|
||||
if (sortType == this.mSortType && reverseSort != this.mReverseSort && !forceSort) {
|
||||
this.mDirList.reverse();
|
||||
this.mFilteredFiles.reverse();
|
||||
} else {
|
||||
var compareFunc, i;
|
||||
|
||||
/* We pre-fetch all the data we are going to sort on, to avoid
|
||||
calling into C++ on every comparison */
|
||||
|
||||
switch (sortType) {
|
||||
case 0:
|
||||
/* no sort has been set yet */
|
||||
return;
|
||||
case nsFileView.SORTTYPE_NAME:
|
||||
for (i = 0; i < this.mDirList.length; i++) {
|
||||
this.mDirList[i].cachedName = this.mDirList[i].file.unicodeLeafName;
|
||||
}
|
||||
for (i = 0; i < this.mFilteredFiles.length; i++) {
|
||||
this.mFilteredFiles[i].cachedName = this.mFilteredFiles[i].file.unicodeLeafName;
|
||||
}
|
||||
compareFunc = sortFilename;
|
||||
break;
|
||||
case nsFileView.SORTTYPE_SIZE:
|
||||
for (i = 0; i < this.mDirList.length; i++) {
|
||||
this.mDirList[i].cachedSize = this.mDirList[i].file.fileSize;
|
||||
}
|
||||
for (i = 0; i < this.mFilteredFiles.length; i++) {
|
||||
this.mFilteredFiles[i].cachedSize = this.mFilteredFiles[i].file.fileSize;
|
||||
}
|
||||
compareFunc = sortSize;
|
||||
break;
|
||||
case nsFileView.SORTTYPE_DATE:
|
||||
for (i = 0; i < this.mDirList.length; i++) {
|
||||
this.mDirList[i].cachedDate = this.mDirList[i].file.lastModificationDate;
|
||||
}
|
||||
for (i = 0; i < this.mFilteredFiles.length; i++) {
|
||||
this.mFilteredFiles[i].cachedDate = this.mFilteredFiles[i].file.lastModificationDate;
|
||||
}
|
||||
compareFunc = sortDate;
|
||||
break;
|
||||
default:
|
||||
throw("Unsupported sort type " + sortType);
|
||||
break;
|
||||
}
|
||||
this.mDirList.sort(compareFunc);
|
||||
this.mFilteredFiles.sort(compareFunc);
|
||||
}
|
||||
|
||||
this.mSortType = sortType;
|
||||
this.mReverseSort = reverseSort;
|
||||
if (this.mOutliner) {
|
||||
this.mOutliner.invalidate();
|
||||
}
|
||||
},
|
||||
|
||||
setDirectory: function(directory) {
|
||||
this.mDirectoryPath = directory;
|
||||
this.mFileList = [];
|
||||
this.mDirList = [];
|
||||
|
||||
var dir = Components.classes[nsLocalFile_CONTRACTID].createInstance(nsILocalFile);
|
||||
dir.followLinks = false;
|
||||
dir.initWithUnicodePath(directory);
|
||||
var dirEntries = dir.QueryInterface(nsIFile).directoryEntries;
|
||||
var nextFile;
|
||||
var fileobj;
|
||||
//var time = new Date();
|
||||
|
||||
while (dirEntries.hasMoreElements()) {
|
||||
nextFile = dirEntries.getNext().QueryInterface(nsIFile);
|
||||
if (nextFile.isDirectory()) {
|
||||
if (!nextFile.isHidden() || this.mShowHiddenFiles) {
|
||||
fileobj = new Object();
|
||||
fileobj.file = nextFile;
|
||||
this.mDirList[this.mDirList.length] = fileobj;
|
||||
}
|
||||
} else if (!this.mDirectoryFilter) {
|
||||
this.mFileList[this.mFileList.length] = nextFile;
|
||||
}
|
||||
}
|
||||
|
||||
//time = new Date() - time;
|
||||
//dump("load time: " + time/1000 + " seconds\n");
|
||||
|
||||
this.mFilteredFiles = [];
|
||||
|
||||
if (this.mOutliner) {
|
||||
var oldRows = this.mTotalRows;
|
||||
this.mTotalRows = this.mDirList.length;
|
||||
if (this.mDirList.length != oldRows) {
|
||||
this.mOutliner.rowCountChanged(0, this.mDirList.length - oldRows);
|
||||
}
|
||||
this.mOutliner.invalidate();
|
||||
}
|
||||
|
||||
//time = new Date();
|
||||
|
||||
this.filterFiles();
|
||||
|
||||
//time = new Date() - time;
|
||||
//dump("filter time: " + time/1000 + " seconds\n");
|
||||
//time = new Date();
|
||||
|
||||
this.sort(this.mSortType, this.mReverseSort);
|
||||
|
||||
//time = new Date() - time;
|
||||
//dump("sort time: " + time/1000 + " seconds\n");
|
||||
},
|
||||
|
||||
setFilter: function(filter) {
|
||||
// The filter may contain several components, i.e.:
|
||||
// *.html; *.htm
|
||||
// First separate it into its components
|
||||
var filterList = filter.split(/;[ ]*/);
|
||||
|
||||
if (filterList.length == 0) {
|
||||
// this shouldn't happen
|
||||
return;
|
||||
}
|
||||
|
||||
// Transform everything in the array to a regexp
|
||||
var tmp = filterList[0].replace(/\./g, "\\.");
|
||||
filterList[0] = tmp.replace(/\*/g, ".*");
|
||||
var shortestPrefix = filterList[0];
|
||||
|
||||
for (var i = 1; i < filterList.length; i++) {
|
||||
// * becomes .*, and we escape all .'s with \
|
||||
tmp = filterList[i].replace(/\./g, "\\.");
|
||||
filterList[i] = tmp.replace(/\*/g, ".*");
|
||||
shortestPrefix = shortestPrefix.substr(0, numMatchingChars(shortestPrefix, filterList[i]));
|
||||
}
|
||||
|
||||
var filterStr = shortestPrefix+"(";
|
||||
var startpos = shortestPrefix.length;
|
||||
for (i = 0; i < filterList.length; i++) {
|
||||
filterStr += filterList[i].substr(shortestPrefix.length) + "|";
|
||||
}
|
||||
|
||||
this.mCurrentFilter = new RegExp(filterStr.substr(0, (filterStr.length) - 1) + ")");
|
||||
this.mFilteredFiles = [];
|
||||
|
||||
if (this.mOutliner) {
|
||||
var rowDiff = -(this.mTotalRows - this.mDirList.length);
|
||||
this.mTotalRows = this.mDirList.length;
|
||||
this.mOutliner.rowCountChanged(this.mDirList.length, rowDiff);
|
||||
this.mOutliner.invalidate();
|
||||
}
|
||||
this.filterFiles();
|
||||
this.sort(this.mSortType, this.mReverseSort, true);
|
||||
},
|
||||
|
||||
filterFiles: function() {
|
||||
for(var i = 0; i < this.mFileList.length; i++) {
|
||||
var file = this.mFileList[i];
|
||||
|
||||
if ((this.mShowHiddenFiles || !file.isHidden()) &&
|
||||
file.unicodeLeafName.search(this.mCurrentFilter) == 0) {
|
||||
this.mFilteredFiles[this.mFilteredFiles.length] = { file : file };
|
||||
}
|
||||
}
|
||||
|
||||
this.mTotalRows = this.mDirList.length + this.mFilteredFiles.length;
|
||||
|
||||
// Tell the outliner how many rows we just added
|
||||
if (this.mOutliner) {
|
||||
this.mOutliner.rowCountChanged(this.mDirList.length, this.mFilteredFiles.length);
|
||||
}
|
||||
},
|
||||
|
||||
getSelectedFile: function() {
|
||||
if (0 <= this.mSelection.currentIndex) {
|
||||
if (this.mSelection.currentIndex < this.mDirList.length) {
|
||||
return this.mDirList[this.mSelection.currentIndex].file;
|
||||
} else if ((this.mSelection.currentIndex - this.mDirList.length) < this.mFilteredFiles.length) {
|
||||
return this.mFilteredFiles[this.mSelection.currentIndex - this.mDirList.length].file;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
173
mozilla/xpfe/components/jar.mn
Normal file
173
mozilla/xpfe/components/jar.mn
Normal file
@@ -0,0 +1,173 @@
|
||||
comm.jar:
|
||||
content/communicator/directory/directory.xul (directory/directory.xul)
|
||||
content/communicator/directory/directory.html (directory/directory.html)
|
||||
content/communicator/directory/directory.js (directory/directory.js)
|
||||
content/communicator/history/history.xul (history/resources/history.xul)
|
||||
content/communicator/history/historyTreeOverlay.xul (history/resources/historyTreeOverlay.xul)
|
||||
content/communicator/history/history-panel.xul (history/resources/history-panel.xul)
|
||||
content/communicator/history/history.js (history/resources/history.js)
|
||||
content/communicator/history/history-test.xul (history/resources/history-test.xul)
|
||||
content/communicator/history/history-test.js (history/resources/history-test.js)
|
||||
content/communicator/pref/pref-advanced.xul (prefwindow/resources/content/pref-advanced.xul)
|
||||
content/communicator/pref/pref-appearance.xul (prefwindow/resources/content/pref-appearance.xul)
|
||||
content/communicator/pref/pref-applications.xul (prefwindow/resources/content/pref-applications.xul)
|
||||
content/communicator/pref/pref-applications.js (prefwindow/resources/content/pref-applications.js)
|
||||
content/communicator/pref/pref-applications-edit.xul (prefwindow/resources/content/pref-applications-edit.xul)
|
||||
content/communicator/pref/pref-applications-new.xul (prefwindow/resources/content/pref-applications-new.xul)
|
||||
content/communicator/pref/pref-applications-new.js (prefwindow/resources/content/pref-applications-new.js)
|
||||
content/communicator/pref/overrideHandler.js (prefwindow/resources/content/overrideHandler.js)
|
||||
content/communicator/pref/pref-cache.js (prefwindow/resources/content/pref-cache.js)
|
||||
content/communicator/pref/pref-cache.xul (prefwindow/resources/content/pref-cache.xul)
|
||||
content/communicator/pref/pref-colors.js (prefwindow/resources/content/pref-colors.js)
|
||||
content/communicator/pref/pref-colors.xul (prefwindow/resources/content/pref-colors.xul)
|
||||
content/communicator/pref/pref-themes.xul (prefwindow/resources/content/pref-themes.xul)
|
||||
content/communicator/pref/pref-themes.js (prefwindow/resources/content/pref-themes.js)
|
||||
content/communicator/pref/pref-charset.js (prefwindow/resources/content/pref-charset.js)
|
||||
content/communicator/pref/pref-charset.xul (prefwindow/resources/content/pref-charset.xul)
|
||||
content/communicator/pref/pref-debug.xul (prefwindow/resources/content/pref-debug.xul)
|
||||
content/communicator/pref/pref-debug1.xul (prefwindow/resources/content/pref-debug1.xul)
|
||||
content/communicator/pref/pref-debug2.xul (prefwindow/resources/content/pref-debug2.xul)
|
||||
content/communicator/pref/pref-download.xul (prefwindow/resources/content/pref-download.xul)
|
||||
content/communicator/pref/pref-fonts.js (prefwindow/resources/content/pref-fonts.js)
|
||||
content/communicator/pref/pref-fonts.xul (prefwindow/resources/content/pref-fonts.xul)
|
||||
content/communicator/pref/pref-history.xul (prefwindow/resources/content/pref-history.xul)
|
||||
content/communicator/pref/pref-languages.xul (prefwindow/resources/content/pref-languages.xul)
|
||||
content/communicator/pref/pref-languages-add.xul (prefwindow/resources/content/pref-languages-add.xul)
|
||||
content/communicator/pref/pref-languages.js (prefwindow/resources/content/pref-languages.js)
|
||||
content/communicator/pref/pref-navigator.js (prefwindow/resources/content/pref-navigator.js)
|
||||
content/communicator/pref/pref-navigator.xul (prefwindow/resources/content/pref-navigator.xul)
|
||||
content/communicator/pref/pref-offline.xul (prefwindow/resources/content/pref-offline.xul)
|
||||
content/communicator/pref/pref-proxies.js (prefwindow/resources/content/pref-proxies.js)
|
||||
content/communicator/pref/pref-policies.xul (prefwindow/resources/content/pref-policies.xul)
|
||||
content/communicator/pref/pref-proxies.xul (prefwindow/resources/content/pref-proxies.xul)
|
||||
content/communicator/pref/pref-proxy-manual.xul (prefwindow/resources/content/pref-proxy-manual.xul)
|
||||
content/communicator/pref/pref-search.js (prefwindow/resources/content/pref-search.js)
|
||||
content/communicator/pref/pref-search.xul (prefwindow/resources/content/pref-search.xul)
|
||||
content/communicator/pref/pref-smart_browsing.xul (prefwindow/resources/content/pref-smart_browsing.xul)
|
||||
content/communicator/pref/pref-smartupdate.xul (prefwindow/resources/content/pref-smartupdate.xul)
|
||||
content/communicator/pref/pref.xul (prefwindow/resources/content/pref.xul)
|
||||
content/communicator/pref/nsPrefWindow.js (prefwindow/resources/content/nsPrefWindow.js)
|
||||
content/communicator/pref/preftree.xul (prefwindow/resources/content/preftree.xul)
|
||||
content/communicator/pref/pref-mousewheel.xul (prefwindow/resources/content/pref-mousewheel.xul)
|
||||
content/communicator/pref/pref-winhooks.xul (prefwindow/resources/content/pref-winhooks.xul)
|
||||
content/communicator/pref/pref-winhooks.js (prefwindow/resources/content/pref-winhooks.js)
|
||||
content/communicator/regviewer/regviewer.js (regviewer/regviewer.js)
|
||||
content/communicator/regviewer/regviewer.xul (regviewer/regviewer.xul)
|
||||
content/communicator/related/related-panel.xul (related/resources/related-panel.xul)
|
||||
content/communicator/related/related-panel.js (related/resources/related-panel.js)
|
||||
content/communicator/search/search.js (search/resources/search.js)
|
||||
content/communicator/search/search.xul (search/resources/search.xul)
|
||||
content/communicator/search/search-editor.js (search/resources/search-editor.js)
|
||||
content/communicator/search/search-editor.xul (search/resources/search-editor.xul)
|
||||
content/communicator/search/search-panel.js (search/resources/search-panel.js)
|
||||
content/communicator/search/search-panel.xul (search/resources/search-panel.xul)
|
||||
content/communicator/search/shared.js (search/resources/shared.js)
|
||||
content/communicator/search/find.js (search/resources/find.js)
|
||||
content/communicator/search/find.xul (search/resources/find.xul)
|
||||
content/communicator/search/findresults.xul (search/resources/findresults.xul)
|
||||
content/communicator/search/internet.js (search/resources/internet.js)
|
||||
content/communicator/search/internet.xul (search/resources/internet.xul)
|
||||
content/communicator/search/internetresults.js (search/resources/internetresults.js)
|
||||
content/communicator/search/internetresults.xul (search/resources/internetresults.xul)
|
||||
content/communicator/sidebar/sidebarOverlay.css (sidebar/resources/sidebarOverlay.css)
|
||||
content/communicator/sidebar/customize-panel.js (sidebar/resources/customize-panel.js)
|
||||
content/communicator/sidebar/customize-panel.xul (sidebar/resources/customize-panel.xul)
|
||||
content/communicator/sidebar/sidebarBindings.xml (sidebar/resources/sidebarBindings.xml)
|
||||
content/communicator/sidebar/customize.js (sidebar/resources/customize.js)
|
||||
content/communicator/sidebar/customize.xul (sidebar/resources/customize.xul)
|
||||
content/communicator/sidebar/preview.js (sidebar/resources/preview.js)
|
||||
content/communicator/sidebar/preview.xul (sidebar/resources/preview.xul)
|
||||
content/communicator/sidebar/sidebarOverlay.js (sidebar/resources/sidebarOverlay.js)
|
||||
content/communicator/sidebar/sidebarOverlay.xul (sidebar/resources/sidebarOverlay.xul)
|
||||
content/communicator/sidebar/local-panels.rdf (sidebar/resources/local-panels.rdf)
|
||||
content/communicator/timebomb/warn.xul (timebomb/resources/content/warn.xul)
|
||||
content/communicator/timebomb/expireText.xul (timebomb/resources/content/expireText.xul)
|
||||
|
||||
en-US.jar:
|
||||
locale/en-US/communicator/directory/directory.dtd (directory/locale/en-US/directory.dtd)
|
||||
locale/en-US/communicator/history/history.dtd (history/resources/locale/en-US/history.dtd)
|
||||
locale/en-US/communicator/history/historyTreeOverlay.dtd (history/resources/locale/en-US/historyTreeOverlay.dtd)
|
||||
locale/en-US/communicator/history/history.properties (history/resources/locale/en-US/history.properties)
|
||||
locale/en-US/communicator/pref/pref-advanced.dtd (prefwindow/resources/locale/en-US/pref-advanced.dtd)
|
||||
locale/en-US/communicator/pref/pref-appearance.dtd (prefwindow/resources/locale/en-US/pref-appearance.dtd)
|
||||
locale/en-US/communicator/pref/pref-applications.dtd (prefwindow/resources/locale/en-US/pref-applications.dtd)
|
||||
locale/en-US/communicator/pref/pref-applications.properties (prefwindow/resources/locale/en-US/pref-applications.properties)
|
||||
locale/en-US/communicator/pref/pref-applications-edit.dtd (prefwindow/resources/locale/en-US/pref-applications-edit.dtd)
|
||||
locale/en-US/communicator/pref/pref-cache.dtd (prefwindow/resources/locale/en-US/pref-cache.dtd)
|
||||
locale/en-US/communicator/pref/pref-charset.dtd (prefwindow/resources/locale/en-US/pref-charset.dtd)
|
||||
locale/en-US/communicator/pref/pref-colors.dtd (prefwindow/resources/locale/en-US/pref-colors.dtd)
|
||||
locale/en-US/communicator/pref/pref-themes.dtd (prefwindow/resources/locale/en-US/pref-themes.dtd)
|
||||
locale/en-US/communicator/pref/pref-download.dtd (prefwindow/resources/locale/en-US/pref-download.dtd)
|
||||
locale/en-US/communicator/pref/pref-debug.dtd (prefwindow/resources/locale/en-US/pref-debug.dtd)
|
||||
locale/en-US/communicator/pref/pref-debug1.dtd (prefwindow/resources/locale/en-US/pref-debug1.dtd)
|
||||
locale/en-US/communicator/pref/pref-debug2.dtd (prefwindow/resources/locale/en-US/pref-debug2.dtd)
|
||||
locale/en-US/communicator/pref/pref-fonts.dtd (prefwindow/resources/locale/en-US/pref-fonts.dtd)
|
||||
locale/en-US/communicator/pref/pref-history.dtd (prefwindow/resources/locale/en-US/pref-history.dtd)
|
||||
locale/en-US/communicator/pref/pref-languages.dtd (prefwindow/resources/locale/en-US/pref-languages.dtd)
|
||||
locale/en-US/communicator/pref/pref-languages.properties (prefwindow/resources/locale/en-US/pref-languages.properties)
|
||||
locale/en-US/communicator/pref/pref-navigator.dtd (prefwindow/resources/locale/en-US/pref-navigator.dtd)
|
||||
locale/en-US/communicator/pref/pref-offline.dtd (prefwindow/resources/locale/en-US/pref-offline.dtd)
|
||||
locale/en-US/communicator/pref/pref-policies.dtd (prefwindow/resources/locale/en-US/pref-policies.dtd)
|
||||
locale/en-US/communicator/pref/pref-proxies.dtd (prefwindow/resources/locale/en-US/pref-proxies.dtd)
|
||||
locale/en-US/communicator/pref/pref-proxy-manual.dtd (prefwindow/resources/locale/en-US/pref-proxy-manual.dtd)
|
||||
locale/en-US/communicator/pref/pref-search.dtd (prefwindow/resources/locale/en-US/pref-search.dtd)
|
||||
locale/en-US/communicator/pref/pref-smart_browsing.dtd (prefwindow/resources/locale/en-US/pref-smart_browsing.dtd)
|
||||
locale/en-US/communicator/pref/pref-smartupdate.dtd (prefwindow/resources/locale/en-US/pref-smartupdate.dtd)
|
||||
locale/en-US/communicator/pref/prefutilities.properties (prefwindow/resources/locale/en-US/prefutilities.properties)
|
||||
locale/en-US/communicator/pref/preftree.dtd (prefwindow/resources/locale/en-US/preftree.dtd)
|
||||
locale/en-US/communicator/pref/pref.dtd (prefwindow/resources/locale/en-US/pref.dtd)
|
||||
locale/en-US/communicator/pref/pref-mousewheel.dtd (prefwindow/resources/locale/en-US/pref-mousewheel.dtd)
|
||||
locale/en-US/communicator/pref/pref-winhooks.dtd (prefwindow/resources/locale/en-US/pref-winhooks.dtd)
|
||||
locale/en-US/communicator/regviewer/regviewer.dtd (regviewer/locale/en-US/regviewer.dtd)
|
||||
locale/en-US/communicator/search/find.dtd (search/resources/locale/en-US/find.dtd)
|
||||
locale/en-US/communicator/search/findresults.dtd (search/resources/locale/en-US/findresults.dtd)
|
||||
locale/en-US/communicator/search/internet.dtd (search/resources/locale/en-US/internet.dtd)
|
||||
locale/en-US/communicator/search/internetresults.dtd (search/resources/locale/en-US/internetresults.dtd)
|
||||
locale/en-US/communicator/search/search.dtd (search/resources/locale/en-US/search.dtd)
|
||||
locale/en-US/communicator/search/search-editor.dtd (search/resources/locale/en-US/search-editor.dtd)
|
||||
locale/en-US/communicator/search/search-editor.properties (search/resources/locale/en-US/search-editor.properties)
|
||||
locale/en-US/communicator/search/search-panel.dtd (search/resources/locale/en-US/search-panel.dtd)
|
||||
locale/en-US/communicator/search/search-panel.properties (search/resources/locale/en-US/search-panel.properties)
|
||||
locale/en-US/communicator/search/default.htm (search/resources/locale/en-US/default.htm)
|
||||
locale/en-US/communicator/sidebar/customize.dtd (sidebar/resources/locale/en-US/customize.dtd)
|
||||
locale/en-US/communicator/sidebar/preview.dtd (sidebar/resources/locale/en-US/preview.dtd)
|
||||
locale/en-US/communicator/sidebar/local-panels.dtd (sidebar/resources/locale/en-US/local-panels.dtd)
|
||||
locale/en-US/communicator/sidebar/sidebarOverlay.dtd (sidebar/resources/locale/en-US/sidebarOverlay.dtd)
|
||||
locale/en-US/communicator/sidebar/sidebar.properties (sidebar/resources/locale/en-US/sidebar.properties)
|
||||
locale/en-US/communicator/timebomb/timebomb.dtd (timebomb/resources/locale/en-US/timebomb.dtd)
|
||||
locale/en-US/global/unknownContent.dtd (ucth/resources/locale/en-US/unknownContent.dtd)
|
||||
locale/en-US/global/unknownContent.properties (ucth/resources/locale/en-US/unknownContent.properties)
|
||||
locale/en-US/global/helperAppLauncher.dtd (ucth/resources/locale/en-US/helperAppLauncher.dtd)
|
||||
locale/en-US/global/helperAppLauncher.properties (ucth/resources/locale/en-US/helperAppLauncher.properties)
|
||||
locale/en-US/global/downloadProgress.dtd (xfer/resources/locale/en-US/downloadProgress.dtd)
|
||||
locale/en-US/global/downloadProgress.properties (xfer/resources/locale/en-US/downloadProgress.properties)
|
||||
locale/en-US/global/filepicker.dtd (filepicker/res/locale/en-US/filepicker.dtd)
|
||||
locale/en-US/global/filepicker.properties (filepicker/res/locale/en-US/filepicker.properties)
|
||||
locale/en-US/global/console.dtd (console/resources/locale/en-US/console.dtd)
|
||||
locale/en-US/global/console.properties (console/resources/locale/en-US/console.properties)
|
||||
locale/en-US/global/finddialog.dtd (find/resources/locale/en-US/finddialog.dtd)
|
||||
locale/en-US/global/finddialog.properties (find/resources/locale/en-US/finddialog.properties)
|
||||
locale/en-US/global/replacedialog.dtd (find/resources/locale/en-US/replacedialog.dtd)
|
||||
|
||||
toolkit.jar:
|
||||
content/global/console.js (console/resources/content/console.js)
|
||||
content/global/console.xul (console/resources/content/console.xul)
|
||||
content/global/console.css (console/resources/content/console.css)
|
||||
content/global/consoleBindings.xml (console/resources/content/consoleBindings.xml)
|
||||
content/global/finddialog.js (find/resources/finddialog.js)
|
||||
content/global/finddialog.xul (find/resources/finddialog.xul)
|
||||
content/global/replacedialog.js (find/resources/replacedialog.js)
|
||||
content/global/replacedialog.xul (find/resources/replacedialog.xul)
|
||||
content/global/unknownContent.xul (ucth/resources/unknownContent.xul)
|
||||
content/global/unknownContent.js (ucth/resources/unknownContent.js)
|
||||
content/global/helperAppLauncher.xul (ucth/resources/helperAppLauncher.xul)
|
||||
content/global/helperAppLauncher.js (ucth/resources/helperAppLauncher.js)
|
||||
content/global/helperAppDldProgress.js (ucth/resources/helperAppDldProgress.js)
|
||||
content/global/helperAppDldProgress.xul (ucth/resources/helperAppDldProgress.xul)
|
||||
content/global/downloadProgress.xul (xfer/resources/downloadProgress.xul)
|
||||
content/global/downloadProgress.js (xfer/resources/downloadProgress.js)
|
||||
content/global/autocomplete.xml (autocomplete/resources/content/autocomplete.xml)
|
||||
content/global/autocomplete.css (autocomplete/resources/content/autocomplete.css)
|
||||
content/global/filepicker.js (filepicker/res/content/filepicker.js)
|
||||
content/global/filepicker.xul (filepicker/res/content/filepicker.xul)
|
||||
content/global/nsFileView.js (filepicker/res/content/nsFileView.js)
|
||||
Reference in New Issue
Block a user