Add the Instantbird application in the repository.
|
@ -0,0 +1,6 @@
|
|||
FOR TRANSLATIONS OF THIS LICENSE INTO SELECTED LANGUAGES, PLEASE VISIT WWW.INSTANTBIRD.ORG/LICENSING.
|
||||
|
||||
INSTANTBIRD END-USER SOFTWARE LICENSE AGREEMENT
|
||||
Version 1.0
|
||||
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
DEPTH = ..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(topsrcdir)/config/config.mk
|
||||
|
||||
DIRS = base locales themes app
|
||||
# components extensions
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
ifdef MOZ_INSTALLER
|
||||
DIRS += installer/windows
|
||||
|
||||
# For Windows build the uninstaller during the application build since the
|
||||
# uninstaller is included with the application for mar file generation.
|
||||
libs::
|
||||
$(MAKE) -C installer/windows uninstaller
|
||||
|
||||
endif
|
||||
endif
|
|
@ -0,0 +1,392 @@
|
|||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2002
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Brian Ryner <bryner@brianryner.com>
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
DEPTH = ../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
AB_CD = $(MOZ_UI_LOCALE)
|
||||
|
||||
GRE_MILESTONE = $(shell $(PYTHON) $(topsrcdir)/config/printconfigsetting.py $(LIBXUL_DIST)/bin/platform.ini Build Milestone)
|
||||
GRE_BUILDID = $(shell $(PYTHON) $(topsrcdir)/config/printconfigsetting.py $(LIBXUL_DIST)/bin/platform.ini Build BuildID)
|
||||
|
||||
PLATFORM_LICENSE_FILE = $(topsrcdir)/toolkit/content/license.html
|
||||
MAIL_LICENSE_HTML_FILE = ../license.html
|
||||
MAIL_LICENSE_TXT_FILE = $(topsrcdir)/instantbird/LICENSE.txt
|
||||
MAIL_APP_LICENSE_FILE = $(srcdir)/app-license.html
|
||||
|
||||
DEFINES += \
|
||||
-DINSTANTBIRD_ICO=\"$(DIST)/branding/instantbird.ico\" \
|
||||
-DAB_CD=$(AB_CD) \
|
||||
-DGRE_MILESTONE=$(GRE_MILESTONE) \
|
||||
-DGRE_BUILDID=$(GRE_BUILDID) \
|
||||
-DAPP_EULA_BLOCK=$(MAIL_APP_LICENSE_FILE) \
|
||||
$(NULL)
|
||||
|
||||
DIRS = profile
|
||||
|
||||
GARBAGE += \
|
||||
$(MAIL_LICENSE_HTML_FILE) \
|
||||
$(FINAL_TARGET)/license.html \
|
||||
$(NULL)
|
||||
|
||||
PREF_JS_EXPORTS = \
|
||||
$(srcdir)/profile/all-instantbird.js \
|
||||
$(srcdir)/profile/channel-prefs.js \
|
||||
$(NULL)
|
||||
|
||||
ifeq ($(USE_SHORT_LIBNAME), 1)
|
||||
PROGRAM = instantbird$(BIN_SUFFIX)
|
||||
else
|
||||
PROGRAM = instantbird-bin$(BIN_SUFFIX)
|
||||
endif
|
||||
|
||||
REQUIRES = \
|
||||
xpcom \
|
||||
string \
|
||||
xulapp \
|
||||
$(NULL)
|
||||
|
||||
CPPSRCS = nsMailApp.cpp
|
||||
|
||||
DIST_FILES = application.ini
|
||||
|
||||
LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
|
||||
|
||||
ifdef BUILD_STATIC_LIBS
|
||||
ifdef _MSC_VER
|
||||
STATIC_COMPONENTS_LINKER_PATH = -LIBPATH:$(DEPTH)/staticlib
|
||||
else
|
||||
STATIC_COMPONENTS_LINKER_PATH = -L$(DEPTH)/staticlib
|
||||
endif
|
||||
LIBS += $(DEPTH)/toolkit/xre/$(LIB_PREFIX)xulapp_s.$(LIB_SUFFIX)
|
||||
else
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
LIBS += $(DIST)/bin/XUL
|
||||
else
|
||||
EXTRA_DSO_LIBS += xul
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
TK_LIBS := -framework Cocoa $(TK_LIBS)
|
||||
endif
|
||||
|
||||
ifdef MOZ_ENABLE_LIBXUL
|
||||
APP_XPCOM_LIBS = $(XPCOM_GLUE_LDOPTS)
|
||||
else
|
||||
MOZILLA_INTERNAL_API = 1
|
||||
APP_XPCOM_LIBS = $(XPCOM_LIBS)
|
||||
endif
|
||||
|
||||
LIBS += \
|
||||
$(STATIC_COMPONENTS_LINKER_PATH) \
|
||||
$(MOZ_JS_LIBS) \
|
||||
$(EXTRA_DSO_LIBS) \
|
||||
$(APP_XPCOM_LIBS) \
|
||||
$(NSPR_LIBS) \
|
||||
$(TK_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
# Add explicit X11 dependency when building against X11 toolkits
|
||||
ifneq (,$(filter gtk gtk2 xlib,$(MOZ_WIDGET_TOOLKIT)))
|
||||
LIBS += $(XLDFLAGS) $(XLIBS)
|
||||
endif
|
||||
|
||||
ifdef MOZ_JPROF
|
||||
LIBS += -ljprof
|
||||
endif
|
||||
|
||||
ifndef MOZ_WINCONSOLE
|
||||
ifdef MOZ_DEBUG
|
||||
MOZ_WINCONSOLE = 1
|
||||
else
|
||||
MOZ_WINCONSOLE = 0
|
||||
endif
|
||||
endif
|
||||
|
||||
NSDISTMODE = copy
|
||||
|
||||
include $(topsrcdir)/config/config.mk
|
||||
|
||||
ifdef _MSC_VER
|
||||
# Always enter a Windows program through wmain, whether or not we're
|
||||
# a console application.
|
||||
WIN32_EXE_LDFLAGS += -ENTRY:wmainCRTStartup
|
||||
endif
|
||||
|
||||
ifndef BUILD_STATIC_LIBS
|
||||
|
||||
ifdef NS_TRACE_MALLOC
|
||||
EXTRA_DSO_LIBS += tracemalloc
|
||||
endif
|
||||
|
||||
else
|
||||
include $(topsrcdir)/config/static-config.mk
|
||||
|
||||
EXTRA_DEPS += \
|
||||
$(STATIC_EXTRA_DEPS) \
|
||||
$(NULL)
|
||||
DEFINES += $(STATIC_DEFINES)
|
||||
CPPSRCS += $(STATIC_CPPSRCS)
|
||||
EXTRA_DSO_LIBS += $(STATIC_EXTRA_DSO_LIBS)
|
||||
REQUIRES += $(STATIC_REQUIRES)
|
||||
EXTRA_LIBS += $(STATIC_EXTRA_LIBS)
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
OS_LIBS += $(call EXPAND_LIBNAME,comctl32 comdlg32 uuid shell32 ole32 oleaut32 version winspool)
|
||||
OS_LIBS += $(call EXPAND_LIBNAME,usp10 msimg32)
|
||||
RCINCLUDE = splash.rc
|
||||
ifndef GNU_CC
|
||||
RCFLAGS += -DMOZ_INSTANTBIRD -I$(srcdir)
|
||||
else
|
||||
RCFLAGS += -DMOZ_INSTANTBIRD --include-dir $(srcdir)
|
||||
endif
|
||||
ifdef BUILD_STATIC_LIBS
|
||||
RCFLAGS += -DMOZ_STATIC_BUILD
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH),BeOS)
|
||||
ifdef BUILD_STATIC_LIBS
|
||||
OS_LIBS += -ltracker -lgame
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH),OS2)
|
||||
RESFILE=splashos2.res
|
||||
RCFLAGS += -DMOZ_INSTANTBIRD
|
||||
ifdef BUILD_STATIC_LIBS
|
||||
RCFLAGS += -DMOZ_STATIC_BUILD -i $(DIST)/include/widget
|
||||
endif
|
||||
ifdef DEBUG
|
||||
RCFLAGS += -DDEBUG
|
||||
endif
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
ifdef MOZILLA_OFFICIAL
|
||||
DEFINES += -DMOZILLA_OFFICIAL
|
||||
endif
|
||||
|
||||
ifdef BUILD_STATIC_LIBS
|
||||
include $(topsrcdir)/config/static-rules.mk
|
||||
|
||||
DEFINES += -DIMPL_XREAPI
|
||||
endif
|
||||
|
||||
APP_VERSION = $(shell cat $(srcdir)/../config/version.txt)
|
||||
DEFINES += -DAPP_VERSION="$(APP_VERSION)"
|
||||
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifdef BUILD_STATIC_LIBS
|
||||
LIBS += -lcups -framework AddressBook
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
#
|
||||
# Control the default heap size.
|
||||
# This is the heap returned by GetProcessHeap().
|
||||
# As we use the CRT heap, the default size is too large and wastes VM.
|
||||
#
|
||||
# The default heap size is 1MB on Win32.
|
||||
# The heap will grow if need be.
|
||||
#
|
||||
# Set it to 256k. See bug 127069.
|
||||
#
|
||||
ifndef GNU_CC
|
||||
LDFLAGS += /HEAP:0x40000
|
||||
endif
|
||||
endif
|
||||
|
||||
$(PROGRAM): $(DEPTH)/toolkit/xre/$(LIB_PREFIX)xulapp_s.$(LIB_SUFFIX)
|
||||
|
||||
ifneq (,$(filter windows os2 gtk gtk2,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifneq (,$(filter windows os2,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ICON_SUFFIX=.ico
|
||||
else
|
||||
ICON_SUFFIX=.xpm
|
||||
endif
|
||||
|
||||
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
|
||||
ICON_DIR=gtk
|
||||
else
|
||||
ICON_DIR=$(MOZ_WIDGET_TOOLKIT)
|
||||
endif
|
||||
|
||||
DESKTOP_ICONS = \
|
||||
abcardWindow \
|
||||
addressbookWindow \
|
||||
messengerWindow \
|
||||
msgcomposeWindow \
|
||||
$(NULL)
|
||||
|
||||
ifeq ($(ICON_DIR),gtk)
|
||||
DESKTOP_ICONS_SMALL=$(patsubst %,%16,$(DESKTOP_ICONS))
|
||||
endif
|
||||
|
||||
DESKTOP_ICON_FILES = $(addsuffix $(ICON_SUFFIX), $(DESKTOP_ICONS) $(DESKTOP_ICONS_SMALL))
|
||||
|
||||
libs:: $(addprefix icons/$(ICON_DIR)/,$(DESKTOP_ICON_FILES))
|
||||
$(INSTALL) $^ $(DIST)/bin/chrome/icons/default
|
||||
|
||||
install:: $(addprefix icons/$(ICON_DIR)/,$(DESKTOP_ICON_FILES))
|
||||
$(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(mozappdir)/chrome/icons/default
|
||||
endif
|
||||
|
||||
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
|
||||
libs::
|
||||
$(INSTALL) $(DIST)/branding/default.xpm $(DIST)/bin/chrome/icons/default
|
||||
|
||||
install::
|
||||
$(SYSINSTALL) $(IFLAGS1) $(DIST)/branding/default.xpm $(DESTDIR)$(mozappdir)/chrome/icons/default
|
||||
endif
|
||||
|
||||
export::
|
||||
ifndef MOZ_BRANDING_DIRECTORY
|
||||
$(NSINSTALL) -D $(DIST)/branding
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
cp $(srcdir)/instantbird.ico $(DIST)/branding/instantbird.ico
|
||||
cp $(srcdir)/instantbird.ico $(DIST)/branding/app.ico
|
||||
endif
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
cp $(srcdir)/macbuild/instantbird.icns $(DIST)/branding/instantbird.icns
|
||||
cp $(srcdir)/macbuild/dsstore $(DIST)/branding/dsstore
|
||||
cp $(srcdir)/macbuild/background.png $(DIST)/branding/background.png
|
||||
cp $(srcdir)/macbuild/disk.icns $(DIST)/branding/disk.icns
|
||||
# cp $(srcdir)/macbuild/license.r $(DIST)/branding/license.r
|
||||
endif
|
||||
ifneq (,$(filter gtk gtk2,$(MOZ_WIDGET_TOOLKIT)))
|
||||
cp $(srcdir)/mozicon16.xpm $(DIST)/branding/mozicon16.xpm
|
||||
cp $(srcdir)/mozicon50.xpm $(DIST)/branding/mozicon50.xpm
|
||||
endif
|
||||
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
|
||||
cp $(srcdir)/default.xpm $(DIST)/branding/default.xpm
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq (,$(filter-out OS2 WINNT Darwin,$(OS_ARCH)))
|
||||
instantbird:: mozilla.in Makefile.in Makefile $(DEPTH)/config/autoconf.mk
|
||||
cat $< | sed -e "s|%MOZAPPDIR%|$(mozappdir)|" \
|
||||
-e "s|%MREDIR%|$(mredir)|" \
|
||||
-e "s|%MOZILLA-BIN%|$(PROGRAM)|g" > $@
|
||||
chmod +x $@
|
||||
|
||||
libs:: instantbird
|
||||
$(INSTALL) $< $(DIST)/bin
|
||||
|
||||
install:: instantbird
|
||||
$(SYSINSTALL) $< $(DESTDIR)$(bindir)
|
||||
|
||||
GARBAGE += instantbird
|
||||
GARBAGE += $(addprefix $(DIST)/bin/defaults/pref/, all.js all-instantbird.js channel-prefs.js)
|
||||
endif
|
||||
|
||||
ifneq (,$(filter gtk gtk2,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ICON_FILES = \
|
||||
$(DIST)/branding/mozicon50.xpm \
|
||||
$(DIST)/branding/mozicon16.xpm \
|
||||
$(NULL)
|
||||
|
||||
libs::
|
||||
$(INSTALL) $(ICON_FILES) $(DIST)/bin/icons
|
||||
|
||||
install::
|
||||
$(SYSINSTALL) $(IFLAGS1) $(ICON_FILES) $(DESTDIR)$(mozappdir)/icons
|
||||
endif
|
||||
|
||||
ifeq ($(MOZ_WIDGET_TOOLKIT),photon)
|
||||
LIBS += -lphexlib
|
||||
endif
|
||||
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
|
||||
AB := $(firstword $(subst -, ,$(AB_CD)))
|
||||
|
||||
ifdef MOZ_DEBUG
|
||||
APP_NAME = InstantbirdDebug
|
||||
else
|
||||
APP_NAME = Instantbird
|
||||
endif
|
||||
|
||||
libs:: $(PROGRAM)
|
||||
mkdir -p $(DIST)/$(APP_NAME).app/Contents/MacOS
|
||||
rsync -a --exclude CVS --exclude "*.in" $(srcdir)/macbuild/Contents $(DIST)/$(APP_NAME).app --exclude English.lproj
|
||||
mkdir -p $(DIST)/$(APP_NAME).app/Contents/Resources/$(AB).lproj
|
||||
rsync -a --exclude CVS --exclude "*.in" $(srcdir)/macbuild/Contents/Resources/English.lproj/ $(DIST)/$(APP_NAME).app/Contents/Resources/$(AB).lproj
|
||||
sed -e "s/%APP_VERSION%/$(APP_VERSION)/" -e "s/%APP_NAME%/$(APP_NAME)/" $(srcdir)/macbuild/Contents/Info.plist.in > $(DIST)/$(APP_NAME).app/Contents/Info.plist
|
||||
sed -e "s/%APP_VERSION%/$(APP_VERSION)/" -e "s/%APP_NAME%/$(APP_NAME)/" $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in | iconv -f UTF-8 -t UTF-16 > $(DIST)/$(APP_NAME).app/Contents/Resources/$(AB).lproj/InfoPlist.strings
|
||||
rsync -a $(DIST)/bin/ $(DIST)/$(APP_NAME).app/Contents/MacOS
|
||||
rm -f $(DIST)/$(APP_NAME).app/Contents/MacOS/$(PROGRAM)
|
||||
rsync -aL $(PROGRAM) $(DIST)/$(APP_NAME).app/Contents/MacOS
|
||||
mkdir -p $(DIST)/$(APP_NAME).app/Contents/Plug-Ins
|
||||
rsync -a --copy-unsafe-links $(DIST)/package/PrintPDE.plugin $(DIST)/$(APP_NAME).app/Contents/Plug-Ins
|
||||
cp -RL $(DIST)/branding/instantbird.icns $(DIST)/$(APP_NAME).app/Contents/Resources/instantbird.icns
|
||||
cp -RL $(srcdir)/macbuild/mail-biff-badge.png $(DIST)/$(APP_NAME).app/Contents/Resources/mail-biff-badge.png
|
||||
echo -n APPLMOZM > $(DIST)/$(APP_NAME).app/Contents/PkgInfo
|
||||
# remove CVS dirs from packaged app
|
||||
find $(DIST)/$(APP_NAME).app -type d -name "CVS" -prune -exec rm -rf {} \;
|
||||
|
||||
clean clobber::
|
||||
rm -rf $(DIST)/$(APP_NAME).app
|
||||
endif
|
||||
|
||||
$(MAIL_LICENSE_HTML_FILE): $(PLATFORM_LICENSE_FILE) $(MAIL_APP_LICENSE_FILE)
|
||||
$(PYTHON) $(MOZILLA_DIR)/config/Preprocessor.py $(DEFINES) $< | \
|
||||
sed -e "s/about:license\#/\#/" > $@
|
||||
|
||||
libs:: $(MAIL_LICENSE_TXT_FILE) $(MAIL_LICENSE_HTML_FILE)
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
$(EXIT_ON_ERROR) \
|
||||
for file in $^; do \
|
||||
$(PERL) -pe 's/(?<!\r)\n/\r\n/g;' < $$file > $(FINAL_TARGET)/`basename $$file`; \
|
||||
done
|
||||
else
|
||||
$(SYSINSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)
|
||||
endif
|
||||
|
||||
libs:: $(srcdir)/profile/prefs.js
|
||||
$(INSTALL) $^ $(DIST)/bin/defaults/profile
|
||||
|
||||
install:: $(srcdir)/profile/prefs.js
|
||||
$(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(mozappdir)/defaults/profile
|
|
@ -0,0 +1,5 @@
|
|||
<p>Official <b>binaries</b> of this product released by
|
||||
<a href="http://www.mozillamessaging.com/">Mozilla Messaging, Inc.</a>
|
||||
are made available under
|
||||
<a href="http://www.mozilla.org/foundation/EULA/">the corresponding
|
||||
EULA</a>.
|
|
@ -0,0 +1,58 @@
|
|||
; ***** BEGIN LICENSE BLOCK *****
|
||||
; Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
;
|
||||
; The contents of this file are subject to the Mozilla Public License Version
|
||||
; 1.1 (the "License"); you may not use this file except in compliance with
|
||||
; the License. You may obtain a copy of the License at
|
||||
; http://www.mozilla.org/MPL/
|
||||
;
|
||||
; Software distributed under the License is distributed on an "AS IS" basis,
|
||||
; WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
; for the specific language governing rights and limitations under the
|
||||
; License.
|
||||
;
|
||||
; The Original Code is Mozilla Firefox.
|
||||
;
|
||||
; The Initial Developer of the Original Code is
|
||||
; Benjamin Smedberg <benjamin@smedbergs.us>.
|
||||
;
|
||||
; Portions created by the Initial Developer are Copyright (C) 2006
|
||||
; the Mozilla Foundation <http://www.mozilla.org/>. All Rights Reserved.
|
||||
;
|
||||
; Contributor(s):
|
||||
;
|
||||
; Alternatively, the contents of this file may be used under the terms of
|
||||
; either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
; the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
; in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
; of those above. If you wish to allow use of your version of this file only
|
||||
; under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
; use your version of this file under the terms of the MPL, indicate your
|
||||
; decision by deleting the provisions above and replace them with the notice
|
||||
; and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
; the provisions above, a recipient may use your version of this file under
|
||||
; the terms of any one of the MPL, the GPL or the LGPL.
|
||||
;
|
||||
; ***** END LICENSE BLOCK *****
|
||||
|
||||
#filter substitution
|
||||
[App]
|
||||
Name=Instantbird
|
||||
Version=@APP_VERSION@
|
||||
BuildID=@GRE_BUILDID@
|
||||
Copyright=Copyright (c) 2007-2008 Florian Queze
|
||||
ID={33cb9019-c295-46dd-be21-8c4936574bee}
|
||||
|
||||
[Gecko]
|
||||
MinVersion=@GRE_MILESTONE@
|
||||
MaxVersion=@GRE_MILESTONE@
|
||||
|
||||
[XRE]
|
||||
EnableExtensionManager=1
|
||||
|
||||
#if MOZILLA_OFFICIAL
|
||||
[Crash Reporter]
|
||||
Enabled=1
|
||||
ServerURL=https://crash-reports.mozilla.com/submit
|
||||
#endif
|
||||
|
После Ширина: | Высота: | Размер: 954 B |
|
@ -0,0 +1,30 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<assemblyIdentity
|
||||
version="1.0.0.0"
|
||||
processorArchitecture="*"
|
||||
name="Instantbird"
|
||||
type="win32"
|
||||
/>
|
||||
<description>Mozilla Thunderbird</description>
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity
|
||||
type="win32"
|
||||
name="Microsoft.Windows.Common-Controls"
|
||||
version="6.0.0.0"
|
||||
processorArchitecture="*"
|
||||
publicKeyToken="6595b64144ccf1df"
|
||||
language="*"
|
||||
/>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<ms_asmv3:trustInfo xmlns:ms_asmv3="urn:schemas-microsoft-com:asm.v3">
|
||||
<ms_asmv3:security>
|
||||
<ms_asmv3:requestedPrivileges>
|
||||
<ms_asmv3:requestedExecutionLevel level="asInvoker" uiAccess="false">
|
||||
</ms_asmv3:requestedExecutionLevel>
|
||||
</ms_asmv3:requestedPrivileges>
|
||||
</ms_asmv3:security>
|
||||
</ms_asmv3:trustInfo>
|
||||
</assembly>
|
После Ширина: | Высота: | Размер: 22 KiB |
|
@ -0,0 +1,59 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>instantbird-bin</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>%APP_NAME% %APP_VERSION%, © 1998-2008 Contributors</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>instantbird</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.instantbird</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>%APP_NAME%</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>%APP_VERSION%</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>MOZM</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>%APP_VERSION%</string>
|
||||
<key>CFBundleURLTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleURLName</key>
|
||||
<string>Email Address URL</string>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
<array>
|
||||
<string>mailto</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleURLName</key>
|
||||
<string>News URL</string>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
<array>
|
||||
<string>news</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleURLName</key>
|
||||
<string>RSS / ATOM URL</string>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
<array>
|
||||
<string>feed</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>NSAppleScriptEnabled</key>
|
||||
<true/>
|
||||
<key>CGDisableCoalescedUpdates</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,2 @@
|
|||
CFBundleName = "%APP_NAME%";
|
||||
NSHumanReadableCopyright = "Copyright © 1998-2008 Contributors";
|
После Ширина: | Высота: | Размер: 1.1 KiB |
После Ширина: | Высота: | Размер: 2.9 KiB |
|
@ -0,0 +1,9 @@
|
|||
WIN32_MODULE_DESCRIPTION=Instantbird
|
||||
WIN32_MODULE_PRODUCTNAME=Instantbird
|
||||
WIN32_MODULE_NAME=Instantbird
|
||||
WIN32_MODULE_PRODUCTVERSION=0,1,2,0
|
||||
WIN32_MODULE_PRODUCTVERSION_STRING=0.1.2pre
|
||||
WIN32_MODULE_COPYRIGHT=©Instantbird, Mozilla and libpurple Developers, according to the GPL 2.0 license, as applicable.
|
||||
WIN32_MODULE_COMPANYNAME=Instantbird
|
||||
WIN32_MODULE_TRADEMARKS=Instantbird
|
||||
WIN32_MODULE_COMMENT=Instantbird Instant Messaging Client
|
|
@ -0,0 +1,116 @@
|
|||
/* XPM */
|
||||
static char *mozilla.xpm[] = {
|
||||
/* columns rows colors chars-per-pixel */
|
||||
"16 16 94 2",
|
||||
" c opaque",
|
||||
". c #655a47",
|
||||
"X c #7e6e53",
|
||||
"o c #897a5e",
|
||||
"O c #817764",
|
||||
"+ c #817a6f",
|
||||
"@ c #897d63",
|
||||
"# c #8e8063",
|
||||
"$ c #918369",
|
||||
"% c #948974",
|
||||
"& c #988b71",
|
||||
"* c #988e7d",
|
||||
"= c #a2947b",
|
||||
"- c #af9e7a",
|
||||
"; c #858995",
|
||||
": c #958d83",
|
||||
"> c #9b9da6",
|
||||
", c #9ea3b2",
|
||||
"< c #99a0b8",
|
||||
"1 c #a09682",
|
||||
"2 c #aa9c81",
|
||||
"3 c #a09a90",
|
||||
"4 c #afa285",
|
||||
"5 c #afa288",
|
||||
"6 c #a8a090",
|
||||
"7 c #b4a586",
|
||||
"8 c #b3a689",
|
||||
"9 c #b8aa8c",
|
||||
"0 c #b8ad96",
|
||||
"q c #bcb199",
|
||||
"w c #a1a0a2",
|
||||
"e c #a8a6a4",
|
||||
"r c #aca9a5",
|
||||
"t c #a7aab6",
|
||||
"y c #a6a9b8",
|
||||
"u c #aab0bd",
|
||||
"i c #b6afa1",
|
||||
"p c #b5b1aa",
|
||||
"a c #bbb4a4",
|
||||
"s c #b1b3be",
|
||||
"d c #adb6cc",
|
||||
"f c #adb7d1",
|
||||
"g c #b1b9cd",
|
||||
"h c #b7c0d6",
|
||||
"j c #b8c4e3",
|
||||
"k c #c4b188",
|
||||
"l c #c3b496",
|
||||
"z c #c3b69b",
|
||||
"x c #cebd96",
|
||||
"c c #c9bb99",
|
||||
"v c #c6b9a1",
|
||||
"b c #c3bcac",
|
||||
"n c #c8bca6",
|
||||
"m c #c4bfb2",
|
||||
"M c #d2c097",
|
||||
"N c #d0c19d",
|
||||
"B c #cfc2a3",
|
||||
"V c #cfc4af",
|
||||
"C c #c7c0b2",
|
||||
"Z c #ccc5b5",
|
||||
"A c #d5c7a5",
|
||||
"S c #d7c9ad",
|
||||
"D c #dbcdae",
|
||||
"F c #d7ceba",
|
||||
"G c #daceb5",
|
||||
"H c #ddd0b3",
|
||||
"J c #dbd1ba",
|
||||
"K c #e3d7ba",
|
||||
"L c #e3d8be",
|
||||
"P c #dfd9c8",
|
||||
"I c #cdd4e5",
|
||||
"U c #cfd8ec",
|
||||
"Y c #d3defc",
|
||||
"T c #dee2ef",
|
||||
"R c #d7e3ff",
|
||||
"E c #dfe4f3",
|
||||
"W c #dbe7ff",
|
||||
"Q c #dde8fe",
|
||||
"! c #e5dbc4",
|
||||
"~ c #eadec4",
|
||||
"^ c #e8dfc8",
|
||||
"/ c #ece3cd",
|
||||
"( c #ece4d1",
|
||||
") c #efe8d5",
|
||||
"_ c #e5eaf5",
|
||||
"` c #e3edfe",
|
||||
"' c #e7f1fe",
|
||||
"] c #eef4fe",
|
||||
"[ c #f9f3e3",
|
||||
"{ c #fbf6e8",
|
||||
"} c #f1f6ff",
|
||||
"| c #f4faff",
|
||||
" . c #fbfeff",
|
||||
".. c None",
|
||||
/* pixels */
|
||||
"..............# @ @ ............",
|
||||
"............@ 3 C a @ ..........",
|
||||
"........@ @ 3 b b Z Z O ........",
|
||||
"......@ E T g , > r p m @ ......",
|
||||
"....@ ; . . .} _ I g d y @ ....",
|
||||
"..# + f .} ] ] ] . .| U r @ ..",
|
||||
"..7 * g ' ` ' ` W ` ` ` r k @ ..",
|
||||
"..9 H 0 s Y ` W R W R u 8 M @ ..",
|
||||
"..5 L L v w j d t g < 1 N x @ ..",
|
||||
"..2 L ! ( J : i P b % B A x @ ..",
|
||||
"..= L ! ( F n [ { [ F 5 c x @ ..",
|
||||
"..& K J q Z ( / / ! ^ G 8 - @ ..",
|
||||
"..$ G 2 n / ~ ! L L G D l X @ ..",
|
||||
"..o 8 c ~ J S l - # . @ @ @ ....",
|
||||
"..@ & = @ @ @ ..................",
|
||||
"................................"
|
||||
};
|
|
@ -0,0 +1,292 @@
|
|||
/* XPM */
|
||||
static char *mozilla.xpm[] = {
|
||||
/* columns rows colors chars-per-pixel */
|
||||
"48 48 238 2",
|
||||
" c opaque",
|
||||
". c #3f301d",
|
||||
"X c #3d3e3b",
|
||||
"o c #06175e",
|
||||
"O c #04264b",
|
||||
"+ c #04294f",
|
||||
"@ c #05255e",
|
||||
"# c #08227d",
|
||||
"$ c #063567",
|
||||
"% c #0f3c75",
|
||||
"& c #1a257a",
|
||||
"* c #26394a",
|
||||
"= c #323641",
|
||||
"- c #313940",
|
||||
"; c #393848",
|
||||
": c #06407f",
|
||||
"> c #16406c",
|
||||
", c #1a4571",
|
||||
"< c #3c4449",
|
||||
"1 c #24476c",
|
||||
"2 c #453722",
|
||||
"3 c #4b3d28",
|
||||
"4 c #4f422d",
|
||||
"5 c #51432d",
|
||||
"6 c #574933",
|
||||
"7 c #524c3f",
|
||||
"8 c #5e4f38",
|
||||
"9 c #5d503b",
|
||||
"0 c #64553e",
|
||||
"q c #404a4d",
|
||||
"w c #4a4647",
|
||||
"e c #4a4d4d",
|
||||
"r c #424e59",
|
||||
"t c #484754",
|
||||
"y c #5d584c",
|
||||
"u c #5a6368",
|
||||
"i c #665840",
|
||||
"p c #645b48",
|
||||
"a c #6a5b43",
|
||||
"s c #6c5f49",
|
||||
"d c #6c614e",
|
||||
"f c #73644b",
|
||||
"g c #766a57",
|
||||
"h c #746c5e",
|
||||
"j c #7b6c53",
|
||||
"k c #7b6e58",
|
||||
"l c #7e725a",
|
||||
"z c #63646b",
|
||||
"x c #6c6f7d",
|
||||
"c c #7f7766",
|
||||
"v c #787974",
|
||||
"b c #787d7f",
|
||||
"n c #092a8c",
|
||||
"m c #0e219e",
|
||||
"M c #0a289c",
|
||||
"N c #093c9c",
|
||||
"B c #0c21ab",
|
||||
"V c #0b2aab",
|
||||
"C c #0d23bb",
|
||||
"Z c #1022a0",
|
||||
"A c #253293",
|
||||
"S c #0f2ada",
|
||||
"D c #102ce9",
|
||||
"F c #1130f9",
|
||||
"G c #08469d",
|
||||
"H c #0f5096",
|
||||
"J c #08519d",
|
||||
"K c #155496",
|
||||
"L c #1e5692",
|
||||
"P c #0948ac",
|
||||
"I c #0851a0",
|
||||
"U c #0958ad",
|
||||
"Y c #0e5db1",
|
||||
"T c #1158a4",
|
||||
"R c #165eaa",
|
||||
"E c #0960bc",
|
||||
"W c #2b5d91",
|
||||
"Q c #33409e",
|
||||
"! c #0a68cc",
|
||||
"~ c #0b71dc",
|
||||
"^ c #0b77eb",
|
||||
"/ c #44578c",
|
||||
"( c #4f5c84",
|
||||
") c #616d91",
|
||||
"_ c #68708b",
|
||||
"` c #6f7996",
|
||||
"' c #7e7d81",
|
||||
"] c #6d7caa",
|
||||
"[ c #717ea7",
|
||||
"{ c #0c80fb",
|
||||
"} c #7e898f",
|
||||
"| c #7e8592",
|
||||
" . c #7c849d",
|
||||
".. c #7481a7",
|
||||
"X. c #7280aa",
|
||||
"o. c #7a87ac",
|
||||
"O. c #7685b1",
|
||||
"+. c #817259",
|
||||
"@. c #897a5e",
|
||||
"#. c #877860",
|
||||
"$. c #857a69",
|
||||
"%. c #8b7e66",
|
||||
"&. c #8f8064",
|
||||
"*. c #8c8271",
|
||||
"=. c #918165",
|
||||
"-. c #94856a",
|
||||
";. c #9b8c6f",
|
||||
":. c #918672",
|
||||
">. c #918978",
|
||||
",. c #9b8d73",
|
||||
"<. c #998e7a",
|
||||
"1. c #9e9175",
|
||||
"2. c #a19274",
|
||||
"3. c #a4957a",
|
||||
"4. c #a7997e",
|
||||
"5. c #ab9b7c",
|
||||
"6. c #838389",
|
||||
"7. c #868886",
|
||||
"8. c #898787",
|
||||
"9. c #878992",
|
||||
"0. c #848999",
|
||||
"q. c #859097",
|
||||
"w. c #8e9098",
|
||||
"e. c #908a83",
|
||||
"r. c #94918e",
|
||||
"t. c #9a9181",
|
||||
"y. c #99968d",
|
||||
"u. c #969290",
|
||||
"i. c #9a9691",
|
||||
"p. c #9f9b93",
|
||||
"a. c #9d9b9b",
|
||||
"s. c #858da5",
|
||||
"d. c #808db4",
|
||||
"f. c #8190bd",
|
||||
"g. c #8e98b1",
|
||||
"h. c #9195a3",
|
||||
"j. c #9c9ea6",
|
||||
"k. c #a19682",
|
||||
"l. c #a49981",
|
||||
"z. c #a39c8d",
|
||||
"x. c #a99c84",
|
||||
"c. c #a39d93",
|
||||
"v. c #aea083",
|
||||
"b. c #ada189",
|
||||
"n. c #a6a196",
|
||||
"m. c #a7a299",
|
||||
"M. c #aca495",
|
||||
"N. c #aca79c",
|
||||
"B. c #b3a484",
|
||||
"V. c #b1a68b",
|
||||
"C. c #b6aa8f",
|
||||
"Z. c #b6ab94",
|
||||
"A. c #b1aa9c",
|
||||
"S. c #bbad91",
|
||||
"D. c #bdb090",
|
||||
"F. c #bbb099",
|
||||
"G. c #a4a4aa",
|
||||
"H. c #b6afa0",
|
||||
"J. c #b6b0a5",
|
||||
"K. c #bab3a5",
|
||||
"L. c #bcb6a9",
|
||||
"P. c #beb8aa",
|
||||
"I. c #8796c1",
|
||||
"U. c #8d9cca",
|
||||
"Y. c #9da7c4",
|
||||
"T. c #9fa8c4",
|
||||
"R. c #9da9c9",
|
||||
"E. c #97a6d1",
|
||||
"W. c #98a9da",
|
||||
"Q. c #a3adcb",
|
||||
"!. c #adb3c3",
|
||||
"~. c #abb6d3",
|
||||
"^. c #b0b6c1",
|
||||
"/. c #b1bcdb",
|
||||
"(. c #a8b8e1",
|
||||
"). c #b5c0de",
|
||||
"_. c #b8c2d8",
|
||||
"`. c #bac5e4",
|
||||
"'. c #bbc7e8",
|
||||
"]. c #c0af87",
|
||||
"[. c #c4b38d",
|
||||
"{. c #c3b493",
|
||||
"}. c #c1b69b",
|
||||
"|. c #c6b89d",
|
||||
" X c #c9b994",
|
||||
".X c #ccbd9a",
|
||||
"XX c #c3b8a0",
|
||||
"oX c #c2bbad",
|
||||
"OX c #c4beb1",
|
||||
"+X c #cec2a3",
|
||||
"@X c #c6c0b2",
|
||||
"#X c #c9c2b5",
|
||||
"$X c #ccc6b9",
|
||||
"%X c #d1c4a4",
|
||||
"&X c #d2c5a8",
|
||||
"*X c #d5c9ab",
|
||||
"=X c #d8cbae",
|
||||
"-X c #d5c9b0",
|
||||
";X c #d9ceb2",
|
||||
":X c #dbd0b5",
|
||||
">X c #ddd3ba",
|
||||
",X c #e0d6bd",
|
||||
"<X c #c0c7db",
|
||||
"1X c #c0c9da",
|
||||
"2X c #d2cec4",
|
||||
"3X c #c3cdea",
|
||||
"4X c #cad3e6",
|
||||
"5X c #c8d4ee",
|
||||
"6X c #c7d3f5",
|
||||
"7X c #cad6f8",
|
||||
"8X c #cddaf4",
|
||||
"9X c #d2dbed",
|
||||
"0X c #d8deee",
|
||||
"qX c #d1dbf2",
|
||||
"wX c #d0dbfb",
|
||||
"eX c #dbe1ed",
|
||||
"rX c #d6e1fc",
|
||||
"tX c #dfe4f0",
|
||||
"yX c #dae5fd",
|
||||
"uX c #dee9fe",
|
||||
"iX c #e3d9c3",
|
||||
"pX c #e6ddc8",
|
||||
"aX c #e8dfca",
|
||||
"sX c #e8e0cc",
|
||||
"dX c #ebe4d2",
|
||||
"fX c #eee8d6",
|
||||
"gX c #f1ebdb",
|
||||
"hX c #e2e9f7",
|
||||
"jX c #e3ecfd",
|
||||
"kX c #e9effc",
|
||||
"lX c #e7f0fe",
|
||||
"zX c #ebf2fd",
|
||||
"xX c #f5f0e1",
|
||||
"cX c #f9f5e9",
|
||||
"vX c #f1f6fd",
|
||||
"bX c #f5f9fe",
|
||||
"nX c #fafcfe",
|
||||
"mX c None",
|
||||
/* pixels */
|
||||
"mXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmX",
|
||||
"mXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmX",
|
||||
"mXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmX",
|
||||
"mXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmX",
|
||||
"mXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmX",
|
||||
"mXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmX",
|
||||
"mXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmX",
|
||||
"mXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmX",
|
||||
"mXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmX&.&.&.mXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmX",
|
||||
"mXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmX&.&.t.M.*.5 mXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmX",
|
||||
"mXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmX&.k A.K.K.K.z.9 mXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmX",
|
||||
"mXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmX%.:.L.L.L.P.P.oXA.s mXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmX",
|
||||
"mXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmX&.z.oXoXoXoXoXoXoXoXK.k mXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmX",
|
||||
"mXmXmXmXmXmXmXmXmXmXmXmXmXmXmX] X.X.$.c.A.K.oXOX@X#X#X@X#XoX%.mXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmX",
|
||||
"mXmXmXmXmXmXmXmXmXmXmXmXmXmX/ <XnXtXW.X.` 9.p.N.K.oXOX#X$X$X$X,.mXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmX",
|
||||
"mXmXmXmXmXmXmXmXmXmXmXmXmXmX( vXnXnXnXnXeX/.I.[ .w.c.G.H.P.OX#Xl.mXmXmXmXmXmXmXmXmXmXmXmXmXmXmX",
|
||||
"mXmXmXmXmXmXmXmXmXmXmXmXmX=.o.nXnXnXbXnXbXnXbXbXeX).E.O.o.s.h.a.m.>.mXmXmXmXmXmXmXmXmXmXmXmXmXmX",
|
||||
"mXmXmXmXmXmXmXmXmXmXmXmX&.x _.nXnXbXvXvXvXbXbXnXnXnXnXbXzXqX'.(.W.U.X._ mXmXmXmXmXmXmXmXmXmXmXmX",
|
||||
"mXmXmXmXmXmXmXmXmXmXmX&.m.) hXbXbXvXzXbXvXzXzXzXzXbXbXvXzXnXzXzXkXeX^.6.v.mXmXmXmXmXmXmXmXmXmXmX",
|
||||
"mXmXmXmXmXmXmXmXmXmX&.&.h o.lXzXvXzXzXzXzXzXzXuXzXzXvXzXzXzXzXzXtX!.y.v.5.mXmXmXmXmXmXmXmXmXmXmX",
|
||||
"mXmXmXmXmXmXmXmXmXmXB.1.z R.yXlXkXkXkXlXzXjXuXkXyXzXkXzXkXzXzXeX^.i.5.].4.mXmXmXmXmXmXmXmXmXmXmX",
|
||||
"mXmXmXmXmXmXmXmXmX2.*XF.1.G.4XuXuXuXjXuXlXuXrXyXyXuXuXuXuXuXeX!.y.2.[.[.2.mXmXmXmXmXmXmXmXmXmXmX",
|
||||
"mXmXmXmXmXmXmXmXmX;.*X*X+X3.m._.qXrXyXuXuXuXyXyXyXuXrXrXyX8X!.r.2. X X[.;.mXmXmXmXmXmXmXmXmXmXmX",
|
||||
"mXmXmXmXmXmXmXmXmX-.*X=X>X:XV.<.!.5XrXyXuXuXrXwXrXuXwX8X5X| - d D. X X[.-.mXmXmXmXmXmXmXmXmXmXmX",
|
||||
"mXmXmXmXmXmXmXmXmX&.=X:X>X>X,XXX-.j.`.7XrX8X'.).'.8X6X'.T.8.p B t V. X[.=.mXmXmXmXmXmXmXmXmXmXmX",
|
||||
"mXmXmXmXmXmXmXmXmX@.=X:X>X,XpXaX:X;.e.~.).T.h.8.r.j.Q.g.- k Z.A D w 5.[.l mXmXmXmXmXmXmXmXmXmXmX",
|
||||
"mXmXmXmXmXmXmXmXmX+.*X:X>X,XaXaXdXdXb.$. .>.4.e z.b.-.1 < l.}.Q F Z l B.X mXmXmXmXmXmXmXmXmXmXmX",
|
||||
"mXmXmXmXmXmXmXmXmXj =X:X>XiXsXaXdXdXgXoX-.F.cXR b 2X7.^ 7 y c B F F ; 1.H + mXmXmXmXmXmXmXmXmXmX",
|
||||
"mXmXmXmXmXmXmXmXmXf ;X:X>X,XiXsXdXdXdXn.Z.cXK.^ H y.W { * X % F F F & q ^ I mXmXmXmXmXmXmXmXmXmX",
|
||||
"mXmXmXmXmXmXmXmXmXf *X:X>X>XiXaXpXdXb.b.xXxXq.{ { , E { Y > ! S F F m ! { E mXmXmXmXmXmXmXmXmXmX",
|
||||
"mXmXmXmXmXmXmXmXmXa *X:X>X>X,XpXpXx.l.gXgXgX} { { { E { { U E C F F C { { E mXmXmXmXmXmXmXmXmXmX",
|
||||
"mXmXmXmXmXmXmXmXmX0 &X*X:X>X>X,Xl.3.fXfXdXp.r E { ! E { { { E V F F V { { + mXmXmXmXmXmXmXmXmXmX",
|
||||
"mXmXmXmXmXmXmXmXmX9 %X*X=X:X>X4.,.aXdXdXaXiXW ~ ^ @ I ^ { { { ^ n F N ^ { ! mXmXmXmXmXmXmXmXmXmX",
|
||||
"mXmXmXmXmXmXmXmXmX6 %X*X*X=X4.-.iXaXaXiXiX,Xv ! ^ C o J { { { { ^ # ! { ^ H mXmXmXmXmXmXmXmXmXmX",
|
||||
"mXmXmXmXmXmXmXmXmX5 %X%X&X3.&.>XiXiXiX,X,X>Xu U ^ M C ! ! ^ { { { ^ { { ^ mXmXmXmXmXmXmXmXmXmXmX",
|
||||
"mXmXmXmXmXmXmXmXmX3 .X%X2.#.>X,X,X>X:X>X:X;XV.T { P S Y { { { { { { { { { mXmXmXmXmXmXmXmXmXmXmX",
|
||||
"mXmXmXmXmXmXmXmXmX2 .X2.k -X>X:X;X;X=X=X%XS.2.&.Y { I @ ^ ^ { { { { { ^ mXmXmXmXmXmXmXmXmXmXmXmX",
|
||||
"mXmXmXmXmXmXmXmXmX. ;.j &X:X=X|.v.,.&.&.%.mXmXmXmX$ U ^ ^ { ^ { ^ ^ I mXmXmXmXmXmXmXmXmXmXmXmXmX",
|
||||
"mXmXmXmXmXmXmXmXmX3 i &.&.&.&.&.mXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmX",
|
||||
"mXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmX",
|
||||
"mXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmX",
|
||||
"mXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmX",
|
||||
"mXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmX",
|
||||
"mXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmX",
|
||||
"mXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmX",
|
||||
"mXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmX",
|
||||
"mXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmX",
|
||||
"mXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmXmX"
|
||||
};
|
|
@ -0,0 +1,144 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is mozilla.org Code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
## $Id: mozilla.in,v 1.8 2008/01/07 23:17:04 reed%reedloden.com Exp $
|
||||
##
|
||||
## Usage:
|
||||
##
|
||||
## $ mozilla [args]
|
||||
##
|
||||
## This script is meant to run the mozilla-bin binary from either
|
||||
## mozilla/xpfe/bootstrap or mozilla/dist/bin.
|
||||
##
|
||||
## The script will setup all the environment voodoo needed to make
|
||||
## the mozilla-bin binary to work.
|
||||
##
|
||||
|
||||
#uncomment for debugging
|
||||
#set -x
|
||||
|
||||
moz_libdir=%MOZAPPDIR%
|
||||
MRE_HOME=%MREDIR%
|
||||
|
||||
# Use run-mozilla.sh in the current dir if it exists
|
||||
# If not, then start resolving symlinks until we find run-mozilla.sh
|
||||
found=0
|
||||
progname="$0"
|
||||
curdir=`dirname "$progname"`
|
||||
progbase=`basename "$progname"`
|
||||
run_moz="$curdir/run-mozilla.sh"
|
||||
if test -x "$run_moz"; then
|
||||
dist_bin="$curdir"
|
||||
found=1
|
||||
else
|
||||
here=`/bin/pwd`
|
||||
while [ -h "$progname" ]; do
|
||||
bn=`basename "$progname"`
|
||||
cd `dirname "$progname"`
|
||||
progname=`/bin/ls -l "$bn" | sed -e 's/^.* -> //' `
|
||||
progbase=`basename "$progname"`
|
||||
if [ ! -x "$progname" ]; then
|
||||
break
|
||||
fi
|
||||
curdir=`dirname "$progname"`
|
||||
run_moz="$curdir/run-mozilla.sh"
|
||||
if [ -x "$run_moz" ]; then
|
||||
cd "$curdir"
|
||||
dist_bin=`pwd`
|
||||
found=1
|
||||
break
|
||||
fi
|
||||
done
|
||||
cd "$here"
|
||||
fi
|
||||
if [ $found = 0 ]; then
|
||||
# Check default compile-time libdir
|
||||
if [ -x "$moz_libdir/run-mozilla.sh" ]; then
|
||||
dist_bin="$moz_libdir"
|
||||
else
|
||||
echo "Cannot find mozilla runtime directory. Exiting."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
script_args=""
|
||||
debugging=0
|
||||
MOZILLA_BIN="${progbase}-bin"
|
||||
|
||||
if [ "$OSTYPE" = "beos" ]; then
|
||||
mimeset -F "$MOZILLA_BIN"
|
||||
fi
|
||||
|
||||
pass_arg_count=0
|
||||
while [ $# -gt $pass_arg_count ]
|
||||
do
|
||||
case "$1" in
|
||||
-p | --pure | -pure)
|
||||
MOZILLA_BIN="${MOZILLA_BIN}.pure"
|
||||
shift
|
||||
;;
|
||||
-g | --debug)
|
||||
script_args="$script_args -g"
|
||||
debugging=1
|
||||
shift
|
||||
;;
|
||||
-d | --debugger)
|
||||
script_args="$script_args -d $2"
|
||||
shift 2
|
||||
;;
|
||||
*)
|
||||
# Move the unrecognized argument to the end of the list.
|
||||
arg="$1"
|
||||
shift
|
||||
set -- "$@" "$arg"
|
||||
pass_arg_count=`expr $pass_arg_count + 1`
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
export MRE_HOME
|
||||
|
||||
if [ $debugging = 1 ]
|
||||
then
|
||||
echo $dist_bin/run-mozilla.sh $script_args $dist_bin/$MOZILLA_BIN "$@"
|
||||
fi
|
||||
"$dist_bin/run-mozilla.sh" $script_args "$dist_bin/$MOZILLA_BIN" "$@"
|
||||
exitcode=$?
|
||||
|
||||
exit $exitcode
|
||||
# EOF.
|
|
@ -0,0 +1,106 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2002
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Brian Ryner <bryner@brianryner.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsXULAppAPI.h"
|
||||
#ifdef XP_WIN
|
||||
#include <windows.h>
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsILocalFile.h"
|
||||
#include "nsStringGlue.h"
|
||||
|
||||
#ifdef XP_WIN
|
||||
#include "nsWindowsWMain.cpp"
|
||||
#endif
|
||||
|
||||
static void Output(const char *fmt, ... )
|
||||
{
|
||||
va_list ap;
|
||||
va_start(ap, fmt);
|
||||
|
||||
#if defined(XP_WIN) && !MOZ_WINCONSOLE
|
||||
char msg[2048];
|
||||
|
||||
_vsnprintf(msg, sizeof(msg), fmt, ap);
|
||||
|
||||
MessageBox(NULL, msg, "XULRunner", MB_OK | MB_ICONERROR);
|
||||
#else
|
||||
vfprintf(stderr, fmt, ap);
|
||||
#endif
|
||||
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
/**
|
||||
* A helper class which calls NS_LogInit/NS_LogTerm in its scope.
|
||||
*/
|
||||
class ScopedLogging
|
||||
{
|
||||
public:
|
||||
ScopedLogging() { NS_LogInit(); }
|
||||
~ScopedLogging() { NS_LogTerm(); }
|
||||
};
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
ScopedLogging log;
|
||||
|
||||
nsCOMPtr<nsILocalFile> appini;
|
||||
nsresult rv = XRE_GetBinaryPath(argv[0], getter_AddRefs(appini));
|
||||
if (NS_FAILED(rv)) {
|
||||
Output("Couldn't calculate the application directory.");
|
||||
return 255;
|
||||
}
|
||||
appini->SetNativeLeafName(NS_LITERAL_CSTRING("application.ini"));
|
||||
|
||||
nsXREAppData *appData;
|
||||
rv = XRE_CreateAppData(appini, &appData);
|
||||
if (NS_FAILED(rv)) {
|
||||
Output("Couldn't read application.ini");
|
||||
return 255;
|
||||
}
|
||||
|
||||
int result = XRE_main(argc, argv, appData);
|
||||
XRE_FreeAppData(appData);
|
||||
return result;
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2002
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
DEPTH = ../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
DIRS = extensions
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
FILES := \
|
||||
mimeTypes.rdf \
|
||||
localstore.rdf \
|
||||
$(NULL)
|
||||
|
||||
libs:: $(FILES)
|
||||
$(SYSINSTALL) $^ $(DIST)/bin/defaults/profile
|
||||
$(SYSINSTALL) $^ $(DIST)/bin/defaults/profile/US
|
||||
|
||||
install:: $(FILES)
|
||||
$(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(mozappdir)/defaults/profile
|
||||
$(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(mozappdir)/defaults/profile/US
|
||||
|
||||
ifneq (,$(filter gtk2 mac cocoa, $(MOZ_WIDGET_TOOLKIT)))
|
||||
DEFINES += -DHAVE_SHELL_SERVICE=1
|
||||
endif
|
|
@ -0,0 +1,32 @@
|
|||
pref("toolkit.defaultChromeURI", "chrome://instantbird/content/blist.xul");
|
||||
pref("general.useragent.extra.instantbird", "Instantbird/0.1.2pre");
|
||||
pref("accessibility.browsewithcaret", true);
|
||||
|
||||
pref("messenger.accounts", "");
|
||||
pref("messenger.options.playSounds", true);
|
||||
|
||||
/* Extension manager */
|
||||
pref("xpinstall.dialog.confirm", "chrome://mozapps/content/xpinstall/xpinstallConfirm.xul");
|
||||
pref("xpinstall.dialog.progress.skin", "chrome://mozapps/content/extensions/extensions.xul");
|
||||
pref("xpinstall.dialog.progress.chrome", "chrome://mozapps/content/extensions/extensions.xul");
|
||||
pref("xpinstall.dialog.progress.type.skin", "Extension:Manager");
|
||||
pref("xpinstall.dialog.progress.type.chrome", "Extension:Manager");
|
||||
pref("extensions.update.enabled", true);
|
||||
pref("extensions.update.interval", 86400);
|
||||
pref("extensions.dss.enabled", false);
|
||||
pref("extensions.dss.switchPending", false);
|
||||
pref("extensions.ignoreMTimeChanges", false);
|
||||
pref("extensions.logging.enabled", false);
|
||||
pref("general.skins.selectedSkin", "classic/1.0");
|
||||
// NB these point at addons.instantbird.org
|
||||
pref("extensions.update.enabled", false);
|
||||
pref("extensions.getMoreExtensionsURL", "http://addons.instantbird.org/%LOCALE%/%VERSION%/extensions/");
|
||||
pref("extensions.getMoreThemesURL", "http://addons.instantbird.org/%LOCALE%/%VERSION%/themes/");
|
||||
pref("extensions.getMorePluginsURL", "http://addons.instantbird.org/%LOCALE%/%VERSION%/plugins/");
|
||||
// suppress external-load warning for standard browser schemes
|
||||
pref("network.protocol-handler.warn-external.http", false);
|
||||
pref("network.protocol-handler.warn-external.https", false);
|
||||
pref("network.protocol-handler.warn-external.ftp", false);
|
||||
|
||||
// don't load links inside Instantbird
|
||||
pref("network.protocol-handler.expose-all", false);
|
|
@ -0,0 +1,2 @@
|
|||
#filter substitution
|
||||
pref("app.update.channel", "@MOZ_UPDATE_CHANNEL@");
|
|
@ -0,0 +1,47 @@
|
|||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2001
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
DEPTH = ../../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
DIRS = {972ce4c6-7e08-4474-a285-3208198ce6fd}
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
|
@ -0,0 +1 @@
|
|||
theme,{972ce4c6-7e08-4474-a285-3208198ce6fd}
|
|
@ -0,0 +1,57 @@
|
|||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2001
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
DEPTH = ../../../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
DEFINES += -DTHUNDERBIRD_VERSION=$(THUNDERBIRD_VERSION)
|
||||
|
||||
FILES := \
|
||||
install.rdf \
|
||||
$(NULL)
|
||||
|
||||
libs::
|
||||
$(PERL) $(MOZILLA_DIR)/config/preprocessor.pl $(DEFINES) $(ACDEFINES) $(srcdir)/install.rdf.in > install.rdf
|
||||
$(INSTALL) $(FILES) $(DIST)/bin/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}
|
||||
|
||||
install::
|
||||
$(SYSINSTALL) $(IFLAGS1) $(FILES) $(DESTDIR)$(mozappdir)/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}
|
|
@ -0,0 +1,48 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
#filter substitution
|
||||
|
||||
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
|
||||
|
||||
<Description about="urn:mozilla:install-manifest">
|
||||
<em:id>{972ce4c6-7e08-4474-a285-3208198ce6fd}</em:id>
|
||||
<em:version>2.0</em:version>
|
||||
|
||||
<!-- Target Application this theme can install into,
|
||||
with minimum and maximum supported versions. -->
|
||||
<em:targetApplication>
|
||||
<Description>
|
||||
<em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id>
|
||||
<em:minVersion>@THUNDERBIRD_VERSION@</em:minVersion>
|
||||
<em:maxVersion>@THUNDERBIRD_VERSION@</em:maxVersion>
|
||||
</Description>
|
||||
</em:targetApplication>
|
||||
|
||||
<!-- Front End MetaData -->
|
||||
<em:name>Thunderbird (default)</em:name>
|
||||
<em:description>The default theme</em:description>
|
||||
|
||||
<!-- EXTENSION AUTHORS!
|
||||
DO NOT COPY THIS PROPERTY INTO YOUR INSTALL RDF FILES
|
||||
It will cause users not to be informed of incompatibilities
|
||||
with your extension when they are updated with Software Update
|
||||
and your extension will become unavailable to them!
|
||||
-->
|
||||
<em:appManaged>true</em:appManaged>
|
||||
|
||||
<em:locked>true</em:locked>
|
||||
|
||||
<!-- Front End Integration Hooks (used by Theme Manager)-->
|
||||
<!-- XXXben - preprocess this file to use different info for mac version -->
|
||||
#ifdef XP_MACOSX
|
||||
<em:creator>Kevin Gerich and Stephen Horlander</em:creator>
|
||||
#else
|
||||
<em:creator>Arvid Axelsson</em:creator>
|
||||
#endif
|
||||
<em:contributor>Mozilla Contributors</em:contributor>
|
||||
|
||||
<em:internalName>classic/1.0</em:internalName>
|
||||
</Description>
|
||||
|
||||
</RDF>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0"?>
|
||||
<RDF:RDF
|
||||
xmlns:NC="http://home.netscape.com/NC-rdf#"
|
||||
xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
||||
</RDF:RDF>
|
|
@ -0,0 +1,82 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<!--
|
||||
This file is used as a persistent data store for helper application
|
||||
information about both MIME type and protocol scheme helpers.
|
||||
|
||||
The root of the data are the two containers
|
||||
<RDF:Seq about="urn:mimetypes:root"/> and <RDF:Seq about="urn:schemes:root"/>.
|
||||
|
||||
These contain one <RDF:li/> entry per MIME type/protocol. Each <RDF:li/> entry
|
||||
corresponds to a "urn:<class>:<type>" resource, where <class> is either
|
||||
"mimetype" or "scheme" and <type> is either a MIME type in "major/minor" format
|
||||
or a scheme. For example, for HTML we would have "urn:mimetype:text/html",
|
||||
while for mailto: we would have "urn:scheme:mailto".
|
||||
|
||||
Typically, this resource will be in the <RDF:Description/> node which has the
|
||||
corresponding "about" attribute.
|
||||
|
||||
Each "urn:<class>:<type>" resource can have the following properties:
|
||||
|
||||
NC:Value - the MIME type or scheme string
|
||||
NC:editable - a "true" or "false" depending on whether this entry is
|
||||
editable
|
||||
NC:description - a description of the type ("HTML Document" for text/html)
|
||||
NC:fileExtensions - for MIME types, there will be one of these properties
|
||||
per extension that corresponds to this MIME type,
|
||||
each one having a single extension as its value.
|
||||
NC:handlerProp - the way the type should be handled. This corresponds to a
|
||||
"urn:<class>:handler:<type>" resource. Eg, the way HTML is
|
||||
handled would be stored in the
|
||||
"urn:mimetype:handler:text/html" resource.
|
||||
|
||||
Each "urn:<class>:handler:<type>" resource can have the following properties:
|
||||
|
||||
NC:useSystemDefault - "true" if we should handle per default OS setting,
|
||||
"false" or not set otherwise
|
||||
NC:saveToDisk - "true" if the data should be saved to disk, "false" or not
|
||||
set otherwise.
|
||||
(Note - if both of these are false, that means "open in helper app")
|
||||
NC:alwaysAsk - "true" if the user should always be prompted before handling
|
||||
data of this type, false otherwise.
|
||||
NC:externalApplication - the preferred helper application to use for this
|
||||
type. This corresponds to a
|
||||
"urn:<class>:externalApplication:<type>" resource.
|
||||
NC:possibleApplication - a helper application that can be used for this type.
|
||||
Since there can be multiple possible applications,
|
||||
there can be multiple assertions in the graph with
|
||||
this property for a given handler resource.
|
||||
|
||||
Each "urn:<class>:externalApplication:<type>" resource, and each resource
|
||||
that represents a possible application, can have the following property:
|
||||
|
||||
NC:prettyName - the "pretty name" of the application ("Acrobat Reader" for
|
||||
/usr/bin/acroread, eg).
|
||||
|
||||
If the resource represents a local application, then it can have the following
|
||||
property:
|
||||
|
||||
NC:path - the path to the application on the local filesystem, for example
|
||||
/usr/bin/test or C:\windows\system32\cmd.exe.
|
||||
|
||||
If the resource represents a web application, then it can have the following
|
||||
property:
|
||||
|
||||
NC:uriTemplate - a URI pointing to the web application to which the type
|
||||
should be handed off, with %s in the template representing
|
||||
the place where the content should be inserted. For example,
|
||||
here is a URI template for a service that lets you email
|
||||
an address in a mailto: link:
|
||||
http://www.example.com/sendmail?link=%s
|
||||
-->
|
||||
|
||||
<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:NC="http://home.netscape.com/NC-rdf#">
|
||||
|
||||
<RDF:Description about="urn:mimetypes">
|
||||
<NC:MIME-types>
|
||||
<RDF:Seq about="urn:mimetypes:root">
|
||||
</RDF:Seq>
|
||||
</NC:MIME-types>
|
||||
</RDF:Description>
|
||||
</RDF:RDF>
|
|
@ -0,0 +1,10 @@
|
|||
# Mozilla User Preferences
|
||||
|
||||
/* Do not edit this file.
|
||||
*
|
||||
* If you make changes to this file while the browser is running,
|
||||
* the changes will be overwritten when the browser exits.
|
||||
*
|
||||
* To make a manual change to preferences, you can visit the URL about:config
|
||||
* For more information, see http://www.mozilla.org/unix/customizing.html#prefs
|
||||
*/
|
|
@ -0,0 +1,95 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Bill Law law@netscape.com
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
#include <windows.h>
|
||||
#include "nsNativeAppSupportWin.h"
|
||||
|
||||
1 24 "instantbird.exe.manifest"
|
||||
|
||||
// Program icon.
|
||||
IDI_APPLICATION ICON INSTANTBIRD_ICO
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
#ifdef DEBUG
|
||||
IDS_STARTMENU_APPNAME, "Instantbird Debug"
|
||||
#else
|
||||
IDS_STARTMENU_APPNAME, "Instantbird"
|
||||
#endif
|
||||
END
|
||||
|
||||
#ifdef MOZ_STATIC_BUILD
|
||||
|
||||
// XXX This code is copied from resource.h and widget.rc. It's a work-around
|
||||
// for the limitation that only one resource file can be used in an .exe. We
|
||||
// should develop a method, for static builds only, to combine multiple .rc
|
||||
// files into a single .rc file, and then use that to build the single .res
|
||||
// file for the .exe.
|
||||
|
||||
#define IDC_GRAB 4101
|
||||
#define IDC_GRABBING 4102
|
||||
#define IDC_CELL 4103
|
||||
#define IDC_COPY 4104
|
||||
#define IDC_ALIAS 4105
|
||||
#define IDC_ZOOMIN 4106
|
||||
#define IDC_ZOOMOUT 4107
|
||||
#define IDC_COLRESIZE 4108
|
||||
#define IDC_ROWRESIZE 4109
|
||||
#define IDC_VERTICALTEXT 4110
|
||||
#define IDC_NONE 4112
|
||||
|
||||
IDC_GRAB CURSOR DISCARDABLE "../../widget/src/build/res/grab.cur"
|
||||
IDC_GRABBING CURSOR DISCARDABLE "../../widget/src/build/res/grabbing.cur"
|
||||
IDC_CELL CURSOR DISCARDABLE "../../widget/src/build/res/cell.cur"
|
||||
IDC_COPY CURSOR DISCARDABLE "../../widget/src/build/res/copy.cur"
|
||||
IDC_ALIAS CURSOR DISCARDABLE "../../widget/src/build/res/aliasb.cur"
|
||||
IDC_ZOOMIN CURSOR DISCARDABLE "../../widget/src/build/res/zoom_in.cur"
|
||||
IDC_ZOOMOUT CURSOR DISCARDABLE "../../widget/src/build/res/zoom_out.cur"
|
||||
IDC_COLRESIZE CURSOR DISCARDABLE "../../widget/src/build/res/col_resize.cur"
|
||||
IDC_ROWRESIZE CURSOR DISCARDABLE "../../widget/src/build/res/row_resize.cur"
|
||||
IDC_VERTICALTEXT CURSOR DISCARDABLE "../../widget/src/build/res/vertical_text.cur"
|
||||
IDC_NONE CURSOR DISCARDABLE "../../widget/src/build/res/none.cur"
|
||||
|
||||
// For some reason IDI_MAILBIFF needs to be larger than the value of IDI_APPLICATION for static builds
|
||||
#define IDI_MAILBIFF 101
|
||||
IDI_MAILBIFF ICON "../../mailnews/build/newmail.ico"
|
||||
|
||||
#define IDI_APPICON 100
|
||||
IDI_APPICON ICON INSTANTBIRD_ICO
|
||||
|
||||
#endif
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Bill Law law@netscape.com
|
||||
* IBM Corp.
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
#include <os2.h>
|
||||
|
||||
// Splash screen dialog ID.
|
||||
#define IDD_SPLASH 100
|
||||
|
||||
// Splash screen bitmap ID.
|
||||
#define IDB_SPLASH 101
|
||||
|
||||
ICON 1 "mozos2.ico"
|
||||
|
||||
DLGTEMPLATE IDD_SPLASH DISCARDABLE
|
||||
BEGIN
|
||||
DIALOG "", IDD_SPLASH, 0, 0, 390, 261, , FCF_BORDER
|
||||
BEGIN
|
||||
END
|
||||
END
|
||||
|
||||
//BITMAP IDB_SPLASH "splash.bmp"
|
||||
|
||||
#ifdef MOZ_STATIC_BUILD
|
||||
#include "wdgtos2rc.h"
|
||||
|
||||
POINTER IDC_SELECTANCHOR "..\\..\\widget\\src\\os2\\res\\select.ptr"
|
||||
POINTER IDC_GRAB "..\\..\\widget\\src\\os2\\res\\grab.ptr"
|
||||
POINTER IDC_GRABBING "..\\..\\widget\\src\\os2\\res\\grabbing.ptr"
|
||||
POINTER IDC_CELL "..\\..\\widget\\src\\os2\\res\\cell.ptr"
|
||||
POINTER IDC_COPY "..\\..\\widget\\src\\os2\\res\\copy.ptr"
|
||||
POINTER IDC_ALIAS "..\\..\\widget\\src\\os2\\res\\aliasb.ptr"
|
||||
POINTER IDC_ZOOMIN "..\\..\\widget\\src\\os2\\res\\zoom_in.ptr"
|
||||
POINTER IDC_ZOOMOUT "..\\..\\widget\\src\\os2\\res\\zoom_out.ptr"
|
||||
|
||||
POINTER IDC_ARROWWAIT "..\\..\\widget\\src\\os2\\res\\arrow_wait.ptr"
|
||||
POINTER IDC_CROSS "..\\..\\widget\\src\\os2\\res\\crosshair.ptr"
|
||||
POINTER IDC_HELP "..\\..\\widget\\src\\os2\\res\\help.ptr"
|
||||
POINTER IDC_NONE "..\\..\\widget\\src\\os2\\res\\none.ptr"
|
||||
|
||||
ICON IDC_DNDURL "..\\..\\widget\\src\\os2\\res\\dndurl.ico"
|
||||
ICON IDC_DNDTEXT "..\\..\\widget\\src\\os2\\res\\dndtext.ico"
|
||||
#endif
|
|
@ -0,0 +1,46 @@
|
|||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Mozilla Browser code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2002
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
DEPTH = ../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
DIRS = content
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
|
@ -0,0 +1,44 @@
|
|||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Mozilla Browser code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2002
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
DEPTH = ../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
После Ширина: | Высота: | Размер: 18 KiB |
После Ширина: | Высота: | Размер: 764 B |
После Ширина: | Высота: | Размер: 42 KiB |
После Ширина: | Высота: | Размер: 7.3 KiB |
|
@ -0,0 +1,64 @@
|
|||
const errorConsoleWindow = "chrome://global/content/console.xul";
|
||||
const configWindow = "chrome://global/content/config.xul";
|
||||
|
||||
// For Venkman
|
||||
|
||||
function toOpenWindowByType(inType, uri) {
|
||||
var winopts = "chrome,extrachrome,menubar,resizable,scrollbars,status,toolbar";
|
||||
window.open(uri, "_blank", winopts);
|
||||
}
|
||||
|
||||
// End { For Venkman }
|
||||
|
||||
var debug = {
|
||||
errors: function debug_errors() {
|
||||
if (!menus.focus("global:console"))
|
||||
window.open(errorConsoleWindow, "Errors",
|
||||
"chrome,extrachrome,menubar,resizable,scrollbars,status,toolbar");
|
||||
},
|
||||
|
||||
config: function debug_config() {
|
||||
if (!menus.focus("Preferences:ConfigManager"))
|
||||
window.open(configWindow, "Config",
|
||||
"chrome,resizable");
|
||||
},
|
||||
|
||||
venkman: function debug_venkman() {
|
||||
start_venkman();
|
||||
}
|
||||
};
|
||||
|
||||
function debug_enumerateProtocols()
|
||||
{
|
||||
dump("trying to enumerate protocols:\n");
|
||||
var pcs = Components.classes["@instantbird.org/purple/core;1"]
|
||||
.getService(Ci.purpleICoreService);
|
||||
for (let proto in getIter(pcs.getProtocols, Ci.purpleIProtocol)) {
|
||||
dump(" " + proto.name + " " + proto.id + "\n");
|
||||
for (let opt in getIter(proto.getOptions, Ci.purpleIPref)) {
|
||||
var type = { };
|
||||
type[opt.typeBool] = ["bool", opt.getBool];
|
||||
type[opt.typeInt] = ["int", opt.getInt];
|
||||
type[opt.typeString] = ["string", opt.getString];
|
||||
dump(" ("+ type[opt.type][0] + ") " +
|
||||
opt.name + (opt.masked ? "(masked)" : "") + "\t" +
|
||||
type[opt.type][1]() + "\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function debug_connectAccount(aProto, aName, aPassword)
|
||||
{
|
||||
var pcs = Components.classes["@instantbird.org/purple/core;1"]
|
||||
.getService(Ci.purpleICoreService);
|
||||
|
||||
var proto = pcs.getProtocolById(aProto);
|
||||
if (!proto)
|
||||
throw "Couldn't get protocol " + aProto;
|
||||
|
||||
var acc = pcs.createAccount(aName, proto);
|
||||
acc.password = aPassword;
|
||||
dump("trying to connect to " + proto.name +
|
||||
" (" + proto.id + ") with " + aName + "\n");
|
||||
acc.connect();
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0"?>
|
||||
<overlay id="debug"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
<script type="application/x-javascript" src="chrome://debug/content/debug.js"/>
|
||||
<script src="chrome://venkman/content/venkman-overlay.js"/>
|
||||
|
||||
<menubar id="blistMenubar">
|
||||
<menu label="Debug" id="debugMenu" insertafter="toolsMenu">
|
||||
<menupopup>
|
||||
<menuitem id="errorConsoleMenuItem" label="Error Console" oncommand="debug.errors()"/>
|
||||
<menuitem id="venkmanMenuItem" label="Venkman" oncommand="debug.venkman()"/>
|
||||
<menuseparator/>
|
||||
<menuitem id="configMenuItem" label="about:config" oncommand="debug.config()"/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
</menubar>
|
||||
</overlay>
|
|
@ -0,0 +1,66 @@
|
|||
#aboutDialog {
|
||||
padding: 0px 0px 10px 0px;
|
||||
}
|
||||
|
||||
#modes {
|
||||
min-height: 380px;
|
||||
}
|
||||
|
||||
#clientBox {
|
||||
background-color: #FFFFFF;
|
||||
background-image: url("chrome://branding/content/about-logo.png");
|
||||
background-repeat: no-repeat;
|
||||
padding-top: 220px;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
#versionWrapper {
|
||||
margin: 0px 0px 3px 20px;
|
||||
}
|
||||
|
||||
#versionField {
|
||||
background-color: #FFFFFF;
|
||||
-moz-appearance: none;
|
||||
border: none;
|
||||
font-weight: bold;
|
||||
color: #909090;
|
||||
}
|
||||
|
||||
#geckoVersionField,
|
||||
#libpurpleVersionField {
|
||||
background-color: #FFFFFF;
|
||||
-moz-appearance: none;
|
||||
border: none;
|
||||
color: #909090;
|
||||
padding-top: 3px !important;
|
||||
padding-left: 10px !important;
|
||||
}
|
||||
|
||||
#copyright {
|
||||
margin: 10px 20px 3px 20px;
|
||||
}
|
||||
|
||||
#userAgentField {
|
||||
margin: 0px 0px 3px 20px !important;
|
||||
background-color: #FFFFFF;
|
||||
-moz-appearance: none;
|
||||
border: none;
|
||||
}
|
||||
|
||||
#groove {
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
#creditsIframe {
|
||||
cursor: default;
|
||||
-moz-user-select: none;
|
||||
}
|
||||
|
||||
button[dlgtype="extra2"] {
|
||||
margin-left: 13px;
|
||||
}
|
||||
|
||||
button[dlgtype="accept"] {
|
||||
margin-right: 13px;
|
||||
}
|
||||
|
|
@ -0,0 +1,148 @@
|
|||
<?xml version="1.0"?> <!-- -*- Mode: HTML -*- -->
|
||||
<!--
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is Mozilla Thunderbird about dialog.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Blake Ross (blaker@netscape.com).
|
||||
# Portions created by the Initial Developer are Copyright (C) 2002
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Florian Quèze <florian@instantbird.org>
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the LGPL or the GPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK ***** -->
|
||||
|
||||
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://instantbird/content/aboutDialog.css" type="text/css"?>
|
||||
|
||||
<!DOCTYPE window [
|
||||
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" >
|
||||
%brandDTD;
|
||||
<!ENTITY % aboutDialogDTD SYSTEM "chrome://instantbird/locale/aboutDialog.dtd" >
|
||||
%aboutDialogDTD;
|
||||
]>
|
||||
|
||||
<dialog xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
id="aboutDialog"
|
||||
windowtype="Messenger:About"
|
||||
buttons="accept,extra2"
|
||||
onload="onLoad();"
|
||||
title="&aboutDialog.title;" creditslabel="&credits.label;" creditsaccesskey="&credits.accesskey;"
|
||||
aboutlabel="&aboutLink.label;" aboutaccesskey="&aboutLink.accesskey;" versionlabel="&aboutVersion;"
|
||||
style="width: 299px; height: 330px;">
|
||||
|
||||
<script type="application/x-javascript">
|
||||
<![CDATA[
|
||||
var gSelectedPage;
|
||||
|
||||
function onLoad() {
|
||||
var xai = Components.classes["@mozilla.org/xre/app-info;1"]
|
||||
.getService(Components.interfaces.nsIXULAppInfo);
|
||||
|
||||
var versionField = document.getElementById("versionField");
|
||||
versionField.value = versionField.value + xai.version
|
||||
+ ' (' + xai.appBuildID + ')';
|
||||
|
||||
versionField = document.getElementById("geckoVersionField");
|
||||
versionField.value = versionField.value + xai.platformVersion
|
||||
+ ' (' + xai.platformBuildID + ')';
|
||||
|
||||
var pcs = Components.classes["@instantbird.org/purple/core;1"]
|
||||
.getService(Components.interfaces.purpleICoreService)
|
||||
versionField = document.getElementById("libpurpleVersionField");
|
||||
versionField.value = versionField.value + pcs.version;
|
||||
|
||||
versionField = document.getElementById("userAgentField");
|
||||
versionField.value = navigator.userAgent;
|
||||
|
||||
var button = document.documentElement.getButton("extra2");
|
||||
button.setAttribute("label", document.documentElement.getAttribute("creditslabel"));
|
||||
button.setAttribute("accesskey", document.documentElement.getAttribute("creditsaccesskey"));
|
||||
gSelectedPage = 0;
|
||||
button.addEventListener("command", switchPage, false);
|
||||
document.documentElement.getButton("accept").focus();
|
||||
}
|
||||
|
||||
function uninit(aEvent)
|
||||
{
|
||||
if (aEvent.target != document)
|
||||
return;
|
||||
var iframe = document.getElementById("creditsIframe");
|
||||
iframe.setAttribute("src", "");
|
||||
}
|
||||
|
||||
function switchPage(aEvent)
|
||||
{
|
||||
var button = aEvent.target;
|
||||
if (button.localName != "button")
|
||||
return;
|
||||
|
||||
var iframe = document.getElementById("creditsIframe");
|
||||
if (gSelectedPage == 0) {
|
||||
iframe.setAttribute("src", "chrome://instantbird/content/credits.xhtml");
|
||||
button.setAttribute("label", document.documentElement.getAttribute("aboutlabel"));
|
||||
button.setAttribute("accesskey", document.documentElement.getAttribute("aboutaccesskey"));
|
||||
gSelectedPage = 1;
|
||||
}
|
||||
else {
|
||||
iframe.setAttribute("src", "");
|
||||
button.setAttribute("label", document.documentElement.getAttribute("creditslabel"));
|
||||
button.setAttribute("accesskey", document.documentElement.getAttribute("creditsaccesskey"));
|
||||
gSelectedPage = 0;
|
||||
}
|
||||
var modes = document.getElementById("modes");
|
||||
modes.setAttribute("selectedIndex", gSelectedPage);
|
||||
}
|
||||
]]>
|
||||
</script>
|
||||
|
||||
<deck id="modes" flex="1">
|
||||
<vbox flex="1" id="clientBox">
|
||||
<vbox id="versionWrapper" flex="1">
|
||||
<textbox id="versionField" readonly="true" class="plain" tabindex="2"
|
||||
value="&aboutVersion; "/>
|
||||
<textbox id="geckoVersionField" readonly="true" class="plain"
|
||||
tabindex="3" value="&geckoVersion; "/>
|
||||
<textbox id="libpurpleVersionField" readonly="true" class="plain"
|
||||
tabindex="4" value="&libpurpleVersion; "/>
|
||||
</vbox>
|
||||
<description id="copyright" flex="1">©rightText;</description>
|
||||
<separator/>
|
||||
<textbox id="userAgentField" readonly="true" class="plain"
|
||||
tabindex="5" multiline="true"/>
|
||||
</vbox>
|
||||
|
||||
<vbox flex="1" id="creditsBox">
|
||||
<html:iframe style="border: 0px;" id="creditsIframe" flex="1"/>
|
||||
</vbox>
|
||||
</deck>
|
||||
|
||||
<separator class="groove" id="groove"/>
|
||||
|
||||
</dialog>
|
|
@ -0,0 +1,202 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is the Instantbird messenging client, released
|
||||
* 2007.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Florian QUEZE <florian@instantbird.org>.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2007
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
const autoJoinPref = "autoJoin";
|
||||
|
||||
var account = {
|
||||
onload: function account_onload() {
|
||||
this.account = window.arguments[0];
|
||||
this.proto = this.account.protocol;
|
||||
document.getElementById("accountName").value = this.account.name;
|
||||
document.getElementById("protocolName").value = this.proto.name;
|
||||
document.getElementById("protocolIcon").src =
|
||||
"chrome://instantbird/skin/prpl/" + this.proto.id + "-48.png"
|
||||
|
||||
if (this.proto.noPassword)
|
||||
document.getElementById("passwordBox").hidden = true;
|
||||
else
|
||||
document.getElementById("password").value = this.account.password;
|
||||
|
||||
document.getElementById("alias").value = this.account.alias;
|
||||
|
||||
this.prefService = Components.classes["@mozilla.org/preferences-service;1"]
|
||||
.getService(Ci.nsIPrefService);
|
||||
if (this.proto.id == "prpl-irc") {
|
||||
document.getElementById("optionalSeparator").hidden = false;
|
||||
document.getElementById("autojoinBox").hidden = false;
|
||||
var branch = this.prefService.getBranch("messenger.account." +
|
||||
this.account.id + ".");
|
||||
if (branch.prefHasUserValue(autoJoinPref)) {
|
||||
document.getElementById("autojoin").value =
|
||||
branch.getCharPref(autoJoinPref);
|
||||
}
|
||||
}
|
||||
|
||||
/* FIXME
|
||||
document.getElementById("newMailNotification").hidden =
|
||||
!this.proto.newMailNotification;
|
||||
*/
|
||||
|
||||
this.prefs = this.prefService.getBranch("messenger.account." +
|
||||
this.account.id + ".options.");
|
||||
this.populateProtoSpecificBox();
|
||||
},
|
||||
|
||||
createTextbox: function account_createTextbox(aType, aValue, aLabel, aName) {
|
||||
var box = document.createElement("vbox");
|
||||
|
||||
var label = document.createElement("label");
|
||||
label.setAttribute("value", aLabel);
|
||||
label.setAttribute("control", aName);
|
||||
box.appendChild(label);
|
||||
|
||||
var textbox = document.createElement("textbox");
|
||||
if (aType)
|
||||
textbox.setAttribute("type", aType);
|
||||
textbox.setAttribute("value", aValue);
|
||||
textbox.setAttribute("id", aName);
|
||||
|
||||
box.appendChild(textbox);
|
||||
return box;
|
||||
},
|
||||
|
||||
getBool: function account_getBool(aOpt) {
|
||||
if (this.prefs.prefHasUserValue(aOpt.name))
|
||||
return this.prefs.getBoolPref(aOpt.name);
|
||||
|
||||
return aOpt.getBool();
|
||||
},
|
||||
|
||||
getInt: function account_getInt(aOpt) {
|
||||
if (this.prefs.prefHasUserValue(aOpt.name))
|
||||
return this.prefs.getIntPref(aOpt.name);
|
||||
|
||||
return aOpt.getInt();
|
||||
},
|
||||
|
||||
getString: function account_getString(aOpt) {
|
||||
if (this.prefs.prefHasUserValue(aOpt.name))
|
||||
return this.prefs.getCharPref(aOpt.name);
|
||||
|
||||
return aOpt.getString();
|
||||
},
|
||||
|
||||
populateProtoSpecificBox: function account_populate() {
|
||||
var gbox = document.getElementById("protoSpecific");
|
||||
var bundle = document.getElementById("prplbundle");
|
||||
var id = this.proto.id;
|
||||
for (let opt in this.getProtoOptions()) {
|
||||
var text = bundle.getString(id + "." + opt.name);
|
||||
var name = id + "-" + opt.name;
|
||||
switch (opt.type) {
|
||||
case opt.typeBool:
|
||||
var chk = document.createElement("checkbox");
|
||||
if (this.getBool(opt))
|
||||
chk.setAttribute("checked", "true");
|
||||
chk.setAttribute("label", text);
|
||||
chk.setAttribute("id", name);
|
||||
gbox.appendChild(chk);
|
||||
break;
|
||||
case opt.typeInt:
|
||||
gbox.appendChild(this.createTextbox("number", this.getInt(opt),
|
||||
text, name));
|
||||
break;
|
||||
case opt.typeString:
|
||||
gbox.appendChild(this.createTextbox(null, this.getString(opt),
|
||||
text, name));
|
||||
break;
|
||||
default:
|
||||
throw "unknown preference type " + opt.type;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
getValue: function account_getValue(aId) {
|
||||
var elt = document.getElementById(aId);
|
||||
if ("checked" in elt)
|
||||
return elt.checked;
|
||||
return elt.value;
|
||||
},
|
||||
|
||||
save: function account_create() {
|
||||
var password = this.getValue("password");
|
||||
if (password != this.account.password)
|
||||
this.account.password = password;
|
||||
|
||||
//acc.rememberPassword = this.getValue("rememberPassword");
|
||||
|
||||
var alias = this.getValue("alias");
|
||||
if (alias != this.account.alias)
|
||||
this.account.alias = alias;
|
||||
|
||||
if (this.proto.id == "prpl-irc") {
|
||||
var branch = this.prefService.getBranch("messenger.account." +
|
||||
this.account.id + ".");
|
||||
var autojoin = this.getValue("autojoin");
|
||||
if (autojoin || branch.prefHasUserValue(autoJoinPref))
|
||||
branch.setCharPref(autoJoinPref, autojoin);
|
||||
}
|
||||
|
||||
for (let opt in this.getProtoOptions()) {
|
||||
var name = this.proto.id + "-" + opt.name;
|
||||
var val = this.getValue(name);
|
||||
switch (opt.type) {
|
||||
case opt.typeBool:
|
||||
if (val != this.getBool(opt))
|
||||
this.account.setBool(opt.name, val);
|
||||
break;
|
||||
case opt.typeInt:
|
||||
if (val != this.getInt(opt))
|
||||
this.account.setInt(opt.name, val);
|
||||
break;
|
||||
case opt.typeString:
|
||||
if (val != this.getString(opt))
|
||||
this.account.setString(opt.name, val);
|
||||
break;
|
||||
default:
|
||||
throw "unknown preference type " + opt.type;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
getProtocols: function account_getProtocols() {
|
||||
return getIter(this.pcs.getProtocols, Ci.purpleIProtocol);
|
||||
},
|
||||
getProtoOptions: function account_getProtoOptions() {
|
||||
return getIter(this.proto.getOptions, Ci.purpleIPref);
|
||||
}
|
||||
};
|
|
@ -0,0 +1,230 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- ***** BEGIN LICENSE BLOCK *****
|
||||
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
-
|
||||
- The contents of this file are subject to the Mozilla Public License Version
|
||||
- 1.1 (the "License"); you may not use this file except in compliance with
|
||||
- the License. You may obtain a copy of the License at
|
||||
- http://www.mozilla.org/MPL/
|
||||
-
|
||||
- Software distributed under the License is distributed on an "AS IS" basis,
|
||||
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
- for the specific language governing rights and limitations under the
|
||||
- License.
|
||||
-
|
||||
- The Original Code is the Instantbird messenging client, released
|
||||
- 2007.
|
||||
-
|
||||
- The Initial Developer of the Original Code is
|
||||
- Florian QUEZE <florian@instantbird.org>.
|
||||
- Portions created by the Initial Developer are Copyright (C) 2007
|
||||
- the Initial Developer. All Rights Reserved.
|
||||
-
|
||||
- Contributor(s):
|
||||
-
|
||||
- Alternatively, the contents of this file may be used under the terms of
|
||||
- either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
- in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
- of those above. If you wish to allow use of your version of this file only
|
||||
- under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
- use your version of this file under the terms of the MPL, indicate your
|
||||
- decision by deleting the provisions above and replace them with the notice
|
||||
- and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
- the provisions above, a recipient may use your version of this file under
|
||||
- the terms of any one of the MPL, the GPL or the LGPL.
|
||||
-
|
||||
- ***** END LICENSE BLOCK ***** -->
|
||||
|
||||
|
||||
<!DOCTYPE bindings [
|
||||
<!ENTITY % accountsDTD SYSTEM "chrome://instantbird/locale/accounts.dtd">
|
||||
%accountsDTD;
|
||||
]>
|
||||
|
||||
<bindings id="accountBindings"
|
||||
xmlns="http://www.mozilla.org/xbl"
|
||||
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:xbl="http://www.mozilla.org/xbl">
|
||||
|
||||
<binding id="account" extends="chrome://global/content/bindings/richlistbox.xml#richlistitem">
|
||||
<content>
|
||||
<xul:vbox flex="1">
|
||||
<xul:hbox flex="1">
|
||||
<xul:vbox flex="1">
|
||||
|
||||
<xul:hbox class="accountNameBox">
|
||||
<xul:label value="&account.name;" class="accountNameLabel"/>
|
||||
<xul:label flex="1" xbl:inherits="value=name"
|
||||
class="accountName"/>
|
||||
</xul:hbox>
|
||||
<xul:hbox class="accountAliasBox">
|
||||
<xul:label value="&account.alias;"/>
|
||||
<xul:label flex="1" xbl:inherits="value=alias"
|
||||
class="accountAlias"/>
|
||||
</xul:hbox>
|
||||
<xul:label class="connecting" anonid="connecting" value="&account.connecting;"/>
|
||||
<xul:label class="connected" value="&account.connected;"/>
|
||||
<xul:label class="disconnecting" value="&account.disconnecting;"/>
|
||||
<xul:label class="disconnected" value="&account.disconnected;"/>
|
||||
<xul:description class="error" anonid="error"/>
|
||||
<xul:spacer flex="1"/>
|
||||
</xul:vbox>
|
||||
<xul:vbox align="center">
|
||||
<xul:image xbl:inherits="src=prplicon" class="accountIcon"/>
|
||||
<xul:image xbl:inherits="src=prplicon" class="accountIconAnim"
|
||||
anonid="prplicon"/>
|
||||
<xul:label xbl:inherits="value=protocol" class="prplName"/>
|
||||
</xul:vbox>
|
||||
</xul:hbox>
|
||||
<xul:hbox flex="1" class="account-buttons">
|
||||
<xul:checkbox label="&account.autoSignOn;"
|
||||
xbl:inherits="checked=autologin"
|
||||
oncommand="gAccountManager.autologin()"/>
|
||||
<xul:spacer flex="1"/>
|
||||
<xul:button class="disconnectButton"
|
||||
label="&account.disconnect.label;"
|
||||
accesskey="&account.disconnect.accesskey;"
|
||||
oncommand="gAccountManager.disconnect()"/>
|
||||
<xul:button class="connectButton"
|
||||
label="&account.connect.label;"
|
||||
accesskey="&account.connect.accesskey;"
|
||||
oncommand="gAccountManager.connect()"/>
|
||||
<xul:button label="&account.delete.label;"
|
||||
accesskey="&account.delete.accesskey;"
|
||||
oncommand="gAccountManager.delete()"/>
|
||||
<xul:button label="&account.edit.label;"
|
||||
accesskey="&account.edit.accesskey;"
|
||||
oncommand="gAccountManager.edit()"/>
|
||||
</xul:hbox>
|
||||
</xul:vbox>
|
||||
</content>
|
||||
<implementation>
|
||||
<method name="build">
|
||||
<parameter name="aAccount"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
this._account = aAccount;
|
||||
this.setAttribute("name", aAccount.name);
|
||||
this.setAttribute("id", aAccount.id);
|
||||
var alias = aAccount.alias;
|
||||
if (alias)
|
||||
this.setAttribute("alias", alias);
|
||||
else
|
||||
this.removeAttribute("alias");
|
||||
var proto = aAccount.protocol;
|
||||
this.setAttribute("protocol", proto.name);
|
||||
this.setAttribute("prplicon", "chrome://instantbird/skin/prpl/" +
|
||||
proto.id + "-32.png");
|
||||
var state = "Unknown";
|
||||
if (this._account.connected) {
|
||||
state = "connected"
|
||||
} else if (this._account.disconnected) {
|
||||
state = "disconnected"
|
||||
if (this._account.connectionStateMsg)
|
||||
this.updateConnectionState(true);
|
||||
} else if (this._account.connecting) {
|
||||
state = "connecting"
|
||||
document.getAnonymousElementByAttribute(this, "anonid", "prplicon").animate();
|
||||
this.updateConnectionState(false);
|
||||
} else if (this._account.disconnecting) {
|
||||
state = "connected"
|
||||
}
|
||||
//dump("state = " + state + "\n");
|
||||
this.setAttribute("state", state);
|
||||
this.autoLogin = aAccount.autoLogin;
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
||||
<method name="connect">
|
||||
<body>
|
||||
<![CDATA[
|
||||
if (this._account.disconnected)
|
||||
this._account.connect();
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
||||
<method name="disconnect">
|
||||
<body>
|
||||
<![CDATA[
|
||||
var acc = this._account;
|
||||
if (acc.connected || acc.connecting)
|
||||
this._account.disconnect();
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
||||
<method name="delete">
|
||||
<body>
|
||||
<![CDATA[
|
||||
var pcs = Components.classes["@instantbird.org/purple/core;1"]
|
||||
.getService(Ci.purpleICoreService);
|
||||
pcs.deleteAccount(this._account.id);
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
||||
<method name="updateConnectionState">
|
||||
<parameter name="aIsError"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
var bundle = document.getElementById("accountsBundle");
|
||||
var key = aIsError ? "account.connection.error"
|
||||
: "account.connection.progress";
|
||||
var text = this._account.connectionStateMsg;
|
||||
text = text ? bundle.getFormattedString(key, [text])
|
||||
: bundle.getString("account.connecting");
|
||||
|
||||
if (aIsError) {
|
||||
this.setAttribute("error", "true");
|
||||
var error = document.getAnonymousElementByAttribute(this, "anonid", "error");
|
||||
setText(error, text);
|
||||
}
|
||||
else {
|
||||
var progress = document.getAnonymousElementByAttribute(this, "anonid", "connecting");
|
||||
progress.setAttribute("value", text);
|
||||
}
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
||||
<property name="autoLogin">
|
||||
<getter>
|
||||
<![CDATA[
|
||||
return this.hasAttribute("autologin");
|
||||
]]>
|
||||
</getter>
|
||||
<setter>
|
||||
<![CDATA[
|
||||
if (val)
|
||||
this.setAttribute("autologin", "true");
|
||||
else
|
||||
this.removeAttribute("autologin");
|
||||
if (this._account.autoLogin != val)
|
||||
this._account.autoLogin = val;
|
||||
return val;
|
||||
]]>
|
||||
</setter>
|
||||
</property>
|
||||
|
||||
<property name="account">
|
||||
<getter>
|
||||
<![CDATA[
|
||||
return this._account;
|
||||
]]>
|
||||
</getter>
|
||||
</property>
|
||||
|
||||
</implementation>
|
||||
<handlers>
|
||||
<handler event="dblclick">
|
||||
<![CDATA[
|
||||
gAccountManager.edit();
|
||||
event.stopPropagation();
|
||||
]]>
|
||||
</handler>
|
||||
</handlers>
|
||||
</binding>
|
||||
</bindings>
|
|
@ -0,0 +1,103 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- ***** BEGIN LICENSE BLOCK *****
|
||||
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
-
|
||||
- The contents of this file are subject to the Mozilla Public License Version
|
||||
- 1.1 (the "License"); you may not use this file except in compliance with
|
||||
- the License. You may obtain a copy of the License at
|
||||
- http://www.mozilla.org/MPL/
|
||||
-
|
||||
- Software distributed under the License is distributed on an "AS IS" basis,
|
||||
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
- for the specific language governing rights and limitations under the
|
||||
- License.
|
||||
-
|
||||
- The Original Code is the Instantbird messenging client, released
|
||||
- 2007.
|
||||
-
|
||||
- The Initial Developer of the Original Code is
|
||||
- Florian QUEZE <florian@instantbird.org>.
|
||||
- Portions created by the Initial Developer are Copyright (C) 2007
|
||||
- the Initial Developer. All Rights Reserved.
|
||||
-
|
||||
- Contributor(s):
|
||||
-
|
||||
- Alternatively, the contents of this file may be used under the terms of
|
||||
- either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
- in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
- of those above. If you wish to allow use of your version of this file only
|
||||
- under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
- use your version of this file under the terms of the MPL, indicate your
|
||||
- decision by deleting the provisions above and replace them with the notice
|
||||
- and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
- the provisions above, a recipient may use your version of this file under
|
||||
- the terms of any one of the MPL, the GPL or the LGPL.
|
||||
-
|
||||
- ***** END LICENSE BLOCK ***** -->
|
||||
|
||||
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://instantbird/skin/account.css" type="text/css"?>
|
||||
|
||||
<!DOCTYPE window SYSTEM "chrome://instantbird/locale/account.dtd">
|
||||
|
||||
<dialog
|
||||
id = "account"
|
||||
title = "&accountWindow.title;"
|
||||
buttons= "accept,cancel"
|
||||
width = "300"
|
||||
height = "400"
|
||||
xmlns = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
onload = "account.onload()"
|
||||
ondialogaccept="account.save()">
|
||||
<script type="application/javascript" src="chrome://instantbird/content/utilities.js"/>
|
||||
<script type="application/javascript" src="chrome://instantbird/content/account.js"/>
|
||||
|
||||
<stringbundle id="prplbundle" src="chrome://instantbird/locale/prpl.properties"/>
|
||||
|
||||
<hbox>
|
||||
<image id="protocolIcon"/>
|
||||
<vbox>
|
||||
<label id="accountName" class="header"/>
|
||||
<label id="protocolName"/>
|
||||
</vbox>
|
||||
</hbox>
|
||||
<separator/>
|
||||
|
||||
<tabbox flex="1">
|
||||
<tabs id="tabs">
|
||||
<tab id="generalTab" label="&account.general;"/>
|
||||
<tab id="advancedTab" label="&account.advanced;"/>
|
||||
</tabs>
|
||||
<tabpanels id="panels" flex="1">
|
||||
<tabpanel orient="vertical" flex="1" style="overflow:auto;">
|
||||
<hbox id="passwordBox" equalsize="always" align="baseline">
|
||||
<label value="&account.password;" control="password" flex="1"/>
|
||||
<textbox id="password" flex="1" type="password"/>
|
||||
</hbox>
|
||||
<checkbox id="rememberPassword" label="&account.rememberPassword;" hidden="true"/>
|
||||
|
||||
<separator class="groove"/>
|
||||
|
||||
<hbox id="aliasBox" equalsize="always" align="baseline">
|
||||
<label value="&account.alias;" control="alias" flex="1"/>
|
||||
<textbox id="alias" flex="1"/>
|
||||
</hbox>
|
||||
|
||||
<separator class="groove" hidden="true" id="optionalSeparator"/>
|
||||
|
||||
<checkbox id="newMailNotification" label="&account.newMailNotification;" hidden="true"/>
|
||||
|
||||
<vbox id="autojoinBox" hidden="true">
|
||||
<label value="&account.autojoin;" control="autojoin" flex="1"/>
|
||||
<textbox id="autojoin" flex="1"/>
|
||||
</vbox>
|
||||
</tabpanel>
|
||||
|
||||
<tabpanel id="advanced" flex="1" style="overflow:auto;">
|
||||
<vbox id="protoSpecific" flex="1"/>
|
||||
</tabpanel>
|
||||
|
||||
</tabpanels>
|
||||
</tabbox>
|
||||
</dialog>
|
|
@ -0,0 +1,292 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is the Instantbird messenging client, released
|
||||
* 2007.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Florian QUEZE <florian@instantbird.org>.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2007
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
|
||||
var accountWizard = {
|
||||
onload: function aw_onload() {
|
||||
var protoList = document.getElementById("protolist");
|
||||
this.pcs = Components.classes["@instantbird.org/purple/core;1"]
|
||||
.getService(Ci.purpleICoreService);
|
||||
for (let proto in this.getProtocols()) {
|
||||
var id = proto.id;
|
||||
var item = protoList.appendItem(proto.name, id, id);
|
||||
item.setAttribute("image", "chrome://instantbird/skin/prpl/" + id + ".png");
|
||||
item.setAttribute("class", "listitem-iconic");
|
||||
}
|
||||
// there is a strange selection bug without this timeout
|
||||
setTimeout(function() {
|
||||
protoList.selectedIndex = 0;
|
||||
}, 0);
|
||||
},
|
||||
|
||||
checkUsername: function aw_checkUsername() {
|
||||
var wizard = document.getElementById("accountWizard");
|
||||
var input = document.getElementById("name");
|
||||
wizard.canAdvance = input.value.length > 0;
|
||||
},
|
||||
|
||||
selectProtocol: function aw_selectProtocol() {
|
||||
var protoList = document.getElementById("protolist");
|
||||
var id = protoList.selectedItem.value;
|
||||
this.proto = this.pcs.getProtocolById(id);
|
||||
|
||||
return true;
|
||||
},
|
||||
|
||||
showUsernamePage: function aw_showUsernamePage() {
|
||||
this.checkUsername();
|
||||
var proto = this.proto.id;
|
||||
document.getElementById("jabberusername").hidden = proto != "prpl-jabber";
|
||||
document.getElementById("ircusername").hidden = proto != "prpl-irc";
|
||||
},
|
||||
|
||||
hideUsernamePage: function aw_hideUsernamePage() {
|
||||
document.getElementById("accountWizard").canAdvance = true;
|
||||
var next = "account" +
|
||||
(this.proto.noPassword ? "alias" : "password");
|
||||
document.getElementById("accountusername").next = next;
|
||||
},
|
||||
|
||||
showAdvanced: function aw_showAdvanced() {
|
||||
// ensure we don't destroy user data if it's not necessary
|
||||
var id = this.proto.id;
|
||||
if (this.protoSpecOptId == id)
|
||||
return;
|
||||
this.protoSpecOptId = id;
|
||||
|
||||
/* FIXME
|
||||
document.getElementById("newMailNotification").hidden =
|
||||
!this.proto.newMailNotification;
|
||||
*/
|
||||
this.populateProtoSpecificBox();
|
||||
},
|
||||
|
||||
createTextbox: function aw_createTextbox(aType, aValue, aLabel, aName) {
|
||||
var box = document.createElement("hbox");
|
||||
box.setAttribute("align", "baseline");
|
||||
box.setAttribute("equalsize", "always");
|
||||
|
||||
var label = document.createElement("label");
|
||||
label.setAttribute("value", aLabel);
|
||||
label.setAttribute("control", aName);
|
||||
box.appendChild(label);
|
||||
|
||||
var textbox = document.createElement("textbox");
|
||||
if (aType)
|
||||
textbox.setAttribute("type", aType);
|
||||
textbox.setAttribute("value", aValue);
|
||||
textbox.setAttribute("id", aName);
|
||||
textbox.setAttribute("flex", "1");
|
||||
|
||||
box.appendChild(textbox);
|
||||
return box;
|
||||
},
|
||||
|
||||
populateProtoSpecificBox: function aw_populate() {
|
||||
var id = this.proto.id;
|
||||
var box = document.getElementById("protoSpecific");
|
||||
var bundle = document.getElementById("prplbundle");
|
||||
var child;
|
||||
while (child = box.firstChild)
|
||||
box.removeChild(child);
|
||||
for (let opt in this.getProtoOptions()) {
|
||||
var text = bundle.getString(id + "." + opt.name);
|
||||
var name = id + "-" + opt.name;
|
||||
switch (opt.type) {
|
||||
case opt.typeBool:
|
||||
var chk = document.createElement("checkbox");
|
||||
if (opt.getBool())
|
||||
chk.setAttribute("checked", "true");
|
||||
chk.setAttribute("label", text);
|
||||
chk.setAttribute("id", name);
|
||||
box.appendChild(chk);
|
||||
break;
|
||||
case opt.typeInt:
|
||||
box.appendChild(this.createTextbox("number", opt.getInt(),
|
||||
text, name));
|
||||
break;
|
||||
case opt.typeString:
|
||||
box.appendChild(this.createTextbox(null, opt.getString(),
|
||||
text, name));
|
||||
break;
|
||||
default:
|
||||
throw "unknown preference type " + opt.type;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
createSummaryRow: function aw_createSummaryRow(aLabel, aValue) {
|
||||
var row = document.createElement("row");
|
||||
row.setAttribute("align", "baseline");
|
||||
|
||||
var label = document.createElement("label");
|
||||
label.setAttribute("class", "header");
|
||||
if (aLabel.length > 20) {
|
||||
aLabel = aLabel.substring(0, 20);
|
||||
aLabel += "...";
|
||||
}
|
||||
label.setAttribute("value", aLabel);
|
||||
row.appendChild(label);
|
||||
|
||||
var textbox = document.createElement("textbox");
|
||||
textbox.setAttribute("value", aValue);
|
||||
textbox.setAttribute("class", "plain");
|
||||
textbox.setAttribute("readonly", true);
|
||||
row.appendChild(textbox);
|
||||
|
||||
return row;
|
||||
},
|
||||
|
||||
showSummary: function aw_showSummary() {
|
||||
var rows = document.getElementById("summaryRows");
|
||||
var bundle = document.getElementById("prplbundle");
|
||||
var child;
|
||||
while (child = rows.firstChild)
|
||||
rows.removeChild(child);
|
||||
|
||||
var label = document.getElementById("protoLabel").value;
|
||||
rows.appendChild(this.createSummaryRow(label, this.proto.name));
|
||||
this.username = this.getValue("name");
|
||||
label = document.getElementById("nameLabel").value;
|
||||
rows.appendChild(this.createSummaryRow(label, this.username));
|
||||
if (!this.proto.noPassword) {
|
||||
this.password = this.getValue("password");
|
||||
label = document.getElementById("passwordLabel").value;
|
||||
var pass = "";
|
||||
for (let i = 0; i < this.password.length; ++i)
|
||||
pass += "*";
|
||||
rows.appendChild(this.createSummaryRow(label, pass));
|
||||
}
|
||||
this.alias = this.getValue("alias");
|
||||
if (this.alias) {
|
||||
label = document.getElementById("aliasLabel").value;
|
||||
rows.appendChild(this.createSummaryRow(label, this.alias));
|
||||
}
|
||||
|
||||
/* FIXME
|
||||
if (this.proto.newMailNotification)
|
||||
rows.appendChild(this.createSummaryRow("Notify of new mails:",
|
||||
this.getValue("newMailNotification")));
|
||||
*/
|
||||
|
||||
var id = this.proto.id;
|
||||
this.prefs = [ ];
|
||||
for (let opt in this.getProtoOptions()) {
|
||||
let name = opt.name;
|
||||
let val = this.getValue(id + "-" + name);
|
||||
switch (opt.type) {
|
||||
case opt.typeBool:
|
||||
if (val != opt.getBool())
|
||||
this.prefs.push({opt: opt, name: name, value: val});
|
||||
break;
|
||||
case opt.typeInt:
|
||||
if (val != opt.getInt())
|
||||
this.prefs.push({opt: opt, name: name, value: val});
|
||||
break;
|
||||
case opt.typeString:
|
||||
if (val != opt.getString())
|
||||
this.prefs.push({opt: opt, name: name, value: val});
|
||||
break;
|
||||
default:
|
||||
throw "unknown preference type " + opt.type;
|
||||
}
|
||||
}
|
||||
|
||||
for (let i = 0; i < this.prefs.length; ++i) {
|
||||
let opt = this.prefs[i];
|
||||
let text = bundle.getString(id + "." + opt.name);
|
||||
rows.appendChild(this.createSummaryRow(text, opt.value));
|
||||
}
|
||||
},
|
||||
|
||||
createAccount: function aw_createAccount() {
|
||||
var acc = this.pcs.createAccount(this.username, this.proto.id);
|
||||
if (!this.proto.noPassword) {
|
||||
acc.password = this.password;
|
||||
acc.rememberPassword = true;
|
||||
}
|
||||
if (this.alias)
|
||||
acc.alias = this.alias;
|
||||
//FIXME: newMailNotification
|
||||
|
||||
for (let i = 0; i < this.prefs.length; ++i) {
|
||||
let option = this.prefs[i];
|
||||
let opt = option.opt;
|
||||
switch(opt.type) {
|
||||
case opt.typeBool:
|
||||
acc.setBool(option.name, option.value);
|
||||
break;
|
||||
case opt.typeInt:
|
||||
acc.setInt(option.name, option.value);
|
||||
break;
|
||||
case opt.typeString:
|
||||
acc.setString(option.name, option.value);
|
||||
break;
|
||||
default:
|
||||
throw "unknown type";
|
||||
}
|
||||
}
|
||||
var autologin = this.getValue("connectNow");
|
||||
acc.autoLogin = autologin;
|
||||
acc.save();
|
||||
|
||||
if (autologin)
|
||||
acc.connect();
|
||||
|
||||
if (window.opener) {
|
||||
var am = window.opener.gAccountManager;
|
||||
if (am)
|
||||
am.selectAccount(acc.id);
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
|
||||
getValue: function aw_getValue(aId) {
|
||||
var elt = document.getElementById(aId);
|
||||
if ("checked" in elt)
|
||||
return elt.checked;
|
||||
return elt.value;
|
||||
},
|
||||
|
||||
getProtocols: function aw_getProtocols() {
|
||||
return getIter(this.pcs.getProtocols, Ci.purpleIProtocol);
|
||||
},
|
||||
getProtoOptions: function aw_getProtoOptions() {
|
||||
return getIter(this.proto.getOptions, Ci.purpleIPref);
|
||||
}
|
||||
};
|
|
@ -0,0 +1,131 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- ***** BEGIN LICENSE BLOCK *****
|
||||
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
-
|
||||
- The contents of this file are subject to the Mozilla Public License Version
|
||||
- 1.1 (the "License"); you may not use this file except in compliance with
|
||||
- the License. You may obtain a copy of the License at
|
||||
- http://www.mozilla.org/MPL/
|
||||
-
|
||||
- Software distributed under the License is distributed on an "AS IS" basis,
|
||||
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
- for the specific language governing rights and limitations under the
|
||||
- License.
|
||||
-
|
||||
- The Original Code is the Instantbird messenging client, released
|
||||
- 2007.
|
||||
-
|
||||
- The Initial Developer of the Original Code is
|
||||
- Florian QUEZE <florian@instantbird.org>.
|
||||
- Portions created by the Initial Developer are Copyright (C) 2007
|
||||
- the Initial Developer. All Rights Reserved.
|
||||
-
|
||||
- Contributor(s):
|
||||
-
|
||||
- Alternatively, the contents of this file may be used under the terms of
|
||||
- either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
- in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
- of those above. If you wish to allow use of your version of this file only
|
||||
- under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
- use your version of this file under the terms of the MPL, indicate your
|
||||
- decision by deleting the provisions above and replace them with the notice
|
||||
- and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
- the provisions above, a recipient may use your version of this file under
|
||||
- the terms of any one of the MPL, the GPL or the LGPL.
|
||||
-
|
||||
- ***** END LICENSE BLOCK ***** -->
|
||||
|
||||
|
||||
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://instantbird/skin/accountWizard.css" type="text/css"?>
|
||||
|
||||
<!DOCTYPE wizard SYSTEM "chrome://instantbird/locale/accountWizard.dtd">
|
||||
|
||||
<wizard id="accountWizard" title="&windowTitle.label;"
|
||||
onwizardfinish="return accountWizard.createAccount();"
|
||||
onload="accountWizard.onload();"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
||||
<script type="application/javascript" src="chrome://instantbird/content/utilities.js"/>
|
||||
<script type="application/javascript" src="chrome://instantbird/content/accountWizard.js"/>
|
||||
<stringbundle id="prplbundle" src="chrome://instantbird/locale/prpl.properties"/>
|
||||
|
||||
<wizardpage id="accountwelcome" pageid="accountwelcome" next="accountprotocol"
|
||||
label="&accountWelcomeTitle.label;">
|
||||
<description>&accountWelcomeInfo.label;</description>
|
||||
<separator/>
|
||||
</wizardpage>
|
||||
|
||||
<wizardpage id="accountprotocol" pageid="accountprotocol" next="accountusername"
|
||||
label="&accountProtocolTitle.label;"
|
||||
onpageadvanced="return accountWizard.selectProtocol();">
|
||||
<description>&accountProtocolInfo.label;</description>
|
||||
<separator/>
|
||||
<label value="&accountProtocolField.label;" control="protolist"
|
||||
id="protoLabel" hidden="true"/>
|
||||
<listbox flex="1" id="protolist"/>
|
||||
</wizardpage>
|
||||
|
||||
<wizardpage id="accountusername" pageid="accountusername" next="accountpassword"
|
||||
label="&accountUsernameTitle.label;"
|
||||
onpageshow="accountWizard.showUsernamePage();"
|
||||
onpagehide="accountWizard.hideUsernamePage();">
|
||||
<description>&accountUsernameInfo.label;</description>
|
||||
<separator/>
|
||||
<hbox id="nameBox" align="baseline">
|
||||
<label value="&accountUsernameField.label;" control="name" id="nameLabel"/>
|
||||
<textbox id="name" oninput="accountWizard.checkUsername();"/>
|
||||
</hbox>
|
||||
<separator/>
|
||||
<description id="jabberusername" hidden="true">&accountUsernameJabberInfo.label;</description>
|
||||
<description id="ircusername" hidden="true">&accountUsernameIrcInfo.label;</description>
|
||||
</wizardpage>
|
||||
|
||||
<wizardpage id="accountpassword" pageid="accountpassword" next="accountalias"
|
||||
label="&accountPasswordTitle.label;">
|
||||
<description>&accountPasswordInfo.label;</description>
|
||||
<separator/>
|
||||
<hbox id="passwordBox" align="baseline">
|
||||
<label value="&accountPasswordField.label;" control="password" id="passwordLabel"/>
|
||||
<textbox id="password" type="password"/>
|
||||
</hbox>
|
||||
</wizardpage>
|
||||
|
||||
<wizardpage id="accountalias" pageid="accountalias" next="accountadvanced"
|
||||
label="&accountAliasTitle.label;">
|
||||
<description>&accountAliasInfo.label;</description>
|
||||
<separator/>
|
||||
<hbox id="aliasBox" align="baseline">
|
||||
<label value="&accountAliasField.label;" control="alias" id="aliasLabel"/>
|
||||
<textbox id="alias"/>
|
||||
</hbox>
|
||||
</wizardpage>
|
||||
|
||||
<wizardpage id="accountadvanced" pageid="accountadvanced" next="accountsummary"
|
||||
label="&accountAdvancedTitle.label;"
|
||||
onpageshow="accountWizard.showAdvanced();">
|
||||
<description>&accountAdvancedInfo.label;</description>
|
||||
<separator/>
|
||||
<checkbox id="newMailNotification"
|
||||
label="&accountAdvanced.newMailNotification.label;" hidden="true"/>
|
||||
<vbox id="protoSpecific" flex="1"/>
|
||||
</wizardpage>
|
||||
|
||||
<wizardpage id="accountsummary" pageid="accountsummary"
|
||||
label="&accountSummaryTitle.label;"
|
||||
onpageshow="accountWizard.showSummary();">
|
||||
<description>&accountSummaryInfo.label;</description>
|
||||
<separator/>
|
||||
<grid flex="1" style="overflow:auto;">
|
||||
<columns>
|
||||
<column/>
|
||||
<column flex="1"/>
|
||||
</columns>
|
||||
<rows id="summaryRows"/>
|
||||
</grid>
|
||||
<separator/>
|
||||
<checkbox id="connectNow" label= "&accountSummary.connectNow.label;" checked="true"/>
|
||||
</wizardpage>
|
||||
|
||||
</wizard>
|
|
@ -0,0 +1,59 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is the Instantbird messenging client, released
|
||||
* 2007.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Florian QUEZE <florian@instantbird.org>.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2007
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
richlistitem {
|
||||
-moz-binding: url("chrome://instantbird/content/account.xml#account");
|
||||
}
|
||||
|
||||
richlistitem:not([selected="true"]) .account-buttons {
|
||||
display: none;
|
||||
}
|
||||
|
||||
richlistitem:not([state="connected"]) .connected,
|
||||
richlistitem:not([state="connecting"]) .connecting,
|
||||
richlistitem:not([state="disconnected"]) .disconnected,
|
||||
richlistitem:not([state="disconnecting"]) .disconnecting,
|
||||
richlistitem:not([error="true"]) .error,
|
||||
richlistitem:not([state="disconnected"]) .error,
|
||||
richlistitem[error="true"] .disconnected,
|
||||
richlistitem:not([state="disconnected"]) .connectButton,
|
||||
richlistitem[state="disconnected"] .disconnectButton,
|
||||
richlistitem[state="disconnecting"] .disconnectButton
|
||||
{
|
||||
display: none;
|
||||
}
|
||||
|
|
@ -0,0 +1,194 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is the Instantbird messenging client, released
|
||||
* 2007.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Florian QUEZE <florian@instantbird.org>.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2007
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
// This is the list of notifications that the account manager window observes
|
||||
const events = [
|
||||
"purple-quit",
|
||||
"account-added",
|
||||
"account-updated",
|
||||
"account-removed",
|
||||
"account-connected",
|
||||
"account-connecting",
|
||||
"account-disconnected",
|
||||
"account-disconnecting",
|
||||
"account-connect-progress",
|
||||
"account-connect-error"
|
||||
];
|
||||
|
||||
var gAccountManager = {
|
||||
load: function am_load() {
|
||||
this.accountList = document.getElementById("accountlist");
|
||||
for (let acc in this.getAccounts()) {
|
||||
//dump(acc.id + ": " + acc.name + "\n");
|
||||
var elt = document.createElement("richlistitem");
|
||||
this.accountList.appendChild(elt);
|
||||
elt.build(acc);
|
||||
}
|
||||
addObservers(this, events);
|
||||
if (!this.accountList.getRowCount())
|
||||
// This is horrible, but it works. Otherwise (at least on mac)
|
||||
// the wizard is not centered relatively to the account manager
|
||||
setTimeout(function() { gAccountManager.new(); }, 0);
|
||||
else
|
||||
this.accountList.selectedIndex = 0;
|
||||
window.addEventListener("unload", this.unload, false);
|
||||
},
|
||||
unload: function am_unload() {
|
||||
removeObservers(gAccountManager, events);
|
||||
},
|
||||
observe: function am_observe(aObject, aTopic, aData) {
|
||||
if (aTopic == "purple-quit") {
|
||||
// libpurple is being uninitialized. We don't need the account
|
||||
// manager window anymore, close it.
|
||||
this.close();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(aObject instanceof Ci.purpleIAccount))
|
||||
throw "Bad notification.";
|
||||
|
||||
if (aTopic == "account-added") {
|
||||
dump("new account : " + aObject.id + ": " + aObject.name + "\n");
|
||||
var elt = document.createElement("richlistitem");
|
||||
this.accountList.appendChild(elt);
|
||||
elt.build(aObject);
|
||||
if (this.accountList.getRowCount() == 1)
|
||||
this.accountList.selectedIndex = 0;
|
||||
}
|
||||
else if (aTopic == "account-removed") {
|
||||
dump("deleting account : " + aObject.id + ": " + aObject.name + "\n");
|
||||
var elt = document.getElementById(aObject.id);
|
||||
if (!elt.selected) {
|
||||
this.accountList.removeChild(elt);
|
||||
return;
|
||||
}
|
||||
// The currently selected element is removed,
|
||||
// ensure another element gets selected (if the list is not empty)
|
||||
var selectedIndex = this.accountList.selectedIndex;
|
||||
this.accountList.removeChild(elt);
|
||||
var count = this.accountList.getRowCount();
|
||||
if (!count)
|
||||
return;
|
||||
if (selectedIndex == count)
|
||||
--selectedIndex;
|
||||
this.accountList.selectedIndex = selectedIndex;
|
||||
dump("new selected index : " + selectedIndex + "\n");
|
||||
}
|
||||
else if (aTopic == "account-updated") {
|
||||
var elt = document.getElementById(aObject.id);
|
||||
elt.build(aObject);
|
||||
return;
|
||||
}
|
||||
|
||||
const stateEvents = {
|
||||
"account-connected": "connected",
|
||||
"account-connecting": "connecting",
|
||||
"account-disconnected": "disconnected",
|
||||
"account-disconnecting": "disconnecting"
|
||||
};
|
||||
var elt = document.getElementById(aObject.id);
|
||||
if (aTopic in stateEvents) {
|
||||
if (!elt) {
|
||||
/* The listitem associated with this account could not be
|
||||
found. This happens when the account is being deleted. The
|
||||
account-removed signal is fired before account-disconnecting
|
||||
and account-disconnected. Maybe we should add a readonly
|
||||
boolean attribute |deleting| to purpleIAccount? */
|
||||
return;
|
||||
}
|
||||
|
||||
/* handle protocol icon animation while connecting */
|
||||
var icon = document.getAnonymousElementByAttribute(elt, "anonid", "prplicon");
|
||||
if (aTopic == "account-connecting") {
|
||||
icon.animate();
|
||||
elt.removeAttribute("error");
|
||||
aObject.connectionStateMsg = "";
|
||||
elt.updateConnectionState(false);
|
||||
}
|
||||
else
|
||||
icon.stop();
|
||||
|
||||
elt.setAttribute("state", stateEvents[aTopic]);
|
||||
}
|
||||
else if (aTopic == "account-connect-progress") {
|
||||
elt.updateConnectionState(false);
|
||||
}
|
||||
else if (aTopic == "account-connect-error") {
|
||||
elt.updateConnectionState(true);
|
||||
}
|
||||
},
|
||||
connect: function am_connect() {
|
||||
this.accountList.selectedItem.connect();
|
||||
},
|
||||
disconnect: function am_disconnect() {
|
||||
this.accountList.selectedItem.disconnect();
|
||||
},
|
||||
delete: function am_delete() {
|
||||
this.accountList.selectedItem.delete();
|
||||
},
|
||||
new: function am_new() {
|
||||
this.openDialog("chrome://instantbird/content/accountWizard.xul");
|
||||
},
|
||||
edit: function am_edit() {
|
||||
this.openDialog("chrome://instantbird/content/account.xul",
|
||||
this.accountList.selectedItem.account);
|
||||
},
|
||||
autologin: function am_autologin() {
|
||||
var elt = this.accountList.selectedItem;
|
||||
elt.autoLogin = !elt.autoLogin;
|
||||
},
|
||||
close: function am_close() {
|
||||
window.close();
|
||||
},
|
||||
|
||||
selectAccount: function am_selectAccount(aAccountId) {
|
||||
this.accountList.selectedItem = document.getElementById(aAccountId);
|
||||
this.accountList.ensureSelectedElementIsVisible();
|
||||
},
|
||||
|
||||
getAccounts: function am_getAccounts() {
|
||||
var pcs = Components.classes["@instantbird.org/purple/core;1"]
|
||||
.getService(Ci.purpleICoreService);
|
||||
return getIter(pcs.getAccounts, Ci.purpleIAccount);
|
||||
},
|
||||
|
||||
openDialog: function am_openDialog(aUrl, aArgs) {
|
||||
window.openDialog(aUrl, "",
|
||||
"chrome,modal,titlebar,centerscreen",
|
||||
aArgs);
|
||||
}
|
||||
};
|
|
@ -0,0 +1,79 @@
|
|||
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
||||
<!-- ***** BEGIN LICENSE BLOCK *****
|
||||
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
-
|
||||
- The contents of this file are subject to the Mozilla Public License Version
|
||||
- 1.1 (the "License"); you may not use this file except in compliance with
|
||||
- the License. You may obtain a copy of the License at
|
||||
- http://www.mozilla.org/MPL/
|
||||
-
|
||||
- Software distributed under the License is distributed on an "AS IS" basis,
|
||||
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
- for the specific language governing rights and limitations under the
|
||||
- License.
|
||||
-
|
||||
- The Original Code is the Instantbird messenging client, released
|
||||
- 2007.
|
||||
-
|
||||
- The Initial Developer of the Original Code is
|
||||
- Florian QUEZE <florian@instantbird.org>.
|
||||
- Portions created by the Initial Developer are Copyright (C) 2007
|
||||
- the Initial Developer. All Rights Reserved.
|
||||
-
|
||||
- Contributor(s):
|
||||
-
|
||||
- Alternatively, the contents of this file may be used under the terms of
|
||||
- either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
- in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
- of those above. If you wish to allow use of your version of this file only
|
||||
- under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
- use your version of this file under the terms of the MPL, indicate your
|
||||
- decision by deleting the provisions above and replace them with the notice
|
||||
- and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
- the provisions above, a recipient may use your version of this file under
|
||||
- the terms of any one of the MPL, the GPL or the LGPL.
|
||||
-
|
||||
- ***** END LICENSE BLOCK ***** -->
|
||||
|
||||
<?xml-stylesheet href="chrome://instantbird/content/accounts.css" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://instantbird/skin/accounts.css" type="text/css"?>
|
||||
|
||||
<!DOCTYPE window [
|
||||
<!ENTITY % accountsDTD SYSTEM "chrome://instantbird/locale/accounts.dtd">
|
||||
%accountsDTD;
|
||||
]>
|
||||
|
||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
id="accountManager"
|
||||
windowtype="Messenger:Accounts"
|
||||
onload="gAccountManager.load()"
|
||||
title="&accountManager.title;"
|
||||
height="300"
|
||||
width="500"
|
||||
persist="screenX screenY">
|
||||
<script type="application/javascript" src="chrome://instantbird/content/utilities.js"/>
|
||||
<script type="application/javascript" src="chrome://instantbird/content/accounts.js"/>
|
||||
|
||||
<stringbundle id="accountsBundle" src="chrome://instantbird/locale/accounts.properties"/>
|
||||
|
||||
<commandset id="accountsCommands">
|
||||
<command id="cmd_close" oncommand="gAccountManager.close()"/>
|
||||
</commandset>
|
||||
|
||||
<keyset id="accountsKeys">
|
||||
<key id="key_close1" key="w" modifiers="accel" command="cmd_close"/>
|
||||
<key id="key_close2" keycode="VK_ESCAPE" command="cmd_close"/>
|
||||
</keyset>
|
||||
|
||||
<richlistbox id="accountlist" flex="1" ondblclick="gAccountManager.new()"/>
|
||||
<hbox id="bottombuttons">
|
||||
<button id="newaccount" oncommand="gAccountManager.new()"
|
||||
label="&accountManager.newAccount.label;"
|
||||
accesskey="&accountManager.newAccount.accesskey;"/>
|
||||
<spacer flex="1"/>
|
||||
<button id="close" command="cmd_close"
|
||||
label="&accountManager.close.label;"
|
||||
accesskey="&accountManager.close.accesskey;"/>
|
||||
</hbox>
|
||||
</window>
|
|
@ -0,0 +1,101 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is the Instantbird messenging client, released
|
||||
* 2007.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Florian QUEZE <florian@instantbird.org>.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2007
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
|
||||
var addBuddy = {
|
||||
onload: function ab_onload() {
|
||||
this.pcs = Components.classes["@instantbird.org/purple/core;1"]
|
||||
.getService(Ci.purpleICoreService);
|
||||
this.buildAccountList();
|
||||
this.buildTagList();
|
||||
},
|
||||
|
||||
buildAccountList: function ab_buildAccountList() {
|
||||
var accountList = document.getElementById("accountlist");
|
||||
for (let acc in this.getAccounts()) {
|
||||
if (!acc.connected)
|
||||
continue;
|
||||
var proto = acc.protocol;
|
||||
var item = accountList.appendItem(acc.name, acc.id, proto.name);
|
||||
item.setAttribute("image", "chrome://instantbird/skin/prpl/" + proto.id + ".png");
|
||||
item.setAttribute("class", "menuitem-iconic");
|
||||
}
|
||||
if (!accountList.itemCount) {
|
||||
document.getElementById("addBuddyDialog").cancelDialog();
|
||||
throw "No connected account!";
|
||||
}
|
||||
accountList.selectedIndex = 0;
|
||||
},
|
||||
|
||||
buildTagList: function ab_buildTagList() {
|
||||
var tagList = document.getElementById("taglist");
|
||||
for (let tag in this.getTags())
|
||||
tagList.appendItem(tag.name, tag.id);
|
||||
tagList.selectedIndex = 0;
|
||||
},
|
||||
|
||||
getValue: function ab_getValue(aId) {
|
||||
var elt = document.getElementById(aId);
|
||||
return elt.value;
|
||||
},
|
||||
|
||||
create: function ab_create() {
|
||||
var account = this.pcs.getAccountById(this.getValue("accountlist"));
|
||||
var name = this.getValue("name");
|
||||
|
||||
var tag;
|
||||
var taglist = document.getElementById("taglist");
|
||||
var items = taglist.getElementsByAttribute("label", taglist.label);
|
||||
if (items.length)
|
||||
tag = this.pcs.getTagById(items[0].value);
|
||||
else
|
||||
tag = this.pcs.createTag(taglist.label);
|
||||
|
||||
this.pcs.addBuddy(account, tag, name);
|
||||
},
|
||||
|
||||
getAccounts: function ab_getAccounts() {
|
||||
return getIter(this.pcs.getAccounts, Ci.purpleIAccount);
|
||||
},
|
||||
getTags: function ab_getTags() {
|
||||
var DBConn = this.pcs.storageConnection;
|
||||
var statement = DBConn.createStatement("SELECT id, name FROM tags");
|
||||
while (statement.executeStep())
|
||||
yield { id: statement.getInt32(0),
|
||||
name: statement.getUTF8String(1) };
|
||||
}
|
||||
};
|
|
@ -0,0 +1,80 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- ***** BEGIN LICENSE BLOCK *****
|
||||
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
-
|
||||
- The contents of this file are subject to the Mozilla Public License Version
|
||||
- 1.1 (the "License"); you may not use this file except in compliance with
|
||||
- the License. You may obtain a copy of the License at
|
||||
- http://www.mozilla.org/MPL/
|
||||
-
|
||||
- Software distributed under the License is distributed on an "AS IS" basis,
|
||||
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
- for the specific language governing rights and limitations under the
|
||||
- License.
|
||||
-
|
||||
- The Original Code is the Instantbird messenging client, released
|
||||
- 2007.
|
||||
-
|
||||
- The Initial Developer of the Original Code is
|
||||
- Florian QUEZE <florian@instantbird.org>.
|
||||
- Portions created by the Initial Developer are Copyright (C) 2007
|
||||
- the Initial Developer. All Rights Reserved.
|
||||
-
|
||||
- Contributor(s):
|
||||
-
|
||||
- Alternatively, the contents of this file may be used under the terms of
|
||||
- either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
- in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
- of those above. If you wish to allow use of your version of this file only
|
||||
- under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
- use your version of this file under the terms of the MPL, indicate your
|
||||
- decision by deleting the provisions above and replace them with the notice
|
||||
- and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
- the provisions above, a recipient may use your version of this file under
|
||||
- the terms of any one of the MPL, the GPL or the LGPL.
|
||||
-
|
||||
- ***** END LICENSE BLOCK ***** -->
|
||||
|
||||
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://instantbird/skin/account.css" type="text/css"?>
|
||||
|
||||
<!DOCTYPE window SYSTEM "chrome://instantbird/locale/addbuddy.dtd">
|
||||
|
||||
<dialog
|
||||
id = "addBuddyDialog"
|
||||
title = "&addBuddyWindow.title;"
|
||||
buttons= "accept,cancel"
|
||||
width = "300"
|
||||
height = "150"
|
||||
xmlns = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
onload = "addBuddy.onload()"
|
||||
ondialogaccept="addBuddy.create()">
|
||||
<script type="application/javascript" src="chrome://instantbird/content/utilities.js"/>
|
||||
<script type="application/javascript" src="chrome://instantbird/content/addbuddy.js"/>
|
||||
|
||||
<grid>
|
||||
<columns>
|
||||
<column/>
|
||||
<column flex="1"/>
|
||||
</columns>
|
||||
<rows>
|
||||
|
||||
<row id="nameBox">
|
||||
<label value="&name.label;" control="name"/>
|
||||
<textbox id="name"/>
|
||||
</row>
|
||||
|
||||
<row id="accountBox">
|
||||
<label value="&account.label;" control="accountlist"/>
|
||||
<menulist id="accountlist"/>
|
||||
</row>
|
||||
|
||||
<row id="tagBox">
|
||||
<label value="&tag.label;" control="taglist"/>
|
||||
<menulist id="taglist" editable="true"/>
|
||||
</row>
|
||||
|
||||
</rows>
|
||||
</grid>
|
||||
</dialog>
|
|
@ -0,0 +1,117 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- ***** BEGIN LICENSE BLOCK *****
|
||||
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
-
|
||||
- The contents of this file are subject to the Mozilla Public License Version
|
||||
- 1.1 (the "License"); you may not use this file except in compliance with
|
||||
- the License. You may obtain a copy of the License at
|
||||
- http://www.mozilla.org/MPL/
|
||||
-
|
||||
- Software distributed under the License is distributed on an "AS IS" basis,
|
||||
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
- for the specific language governing rights and limitations under the
|
||||
- License.
|
||||
-
|
||||
- The Original Code is the Instantbird messenging client, released
|
||||
- 2007.
|
||||
-
|
||||
- The Initial Developer of the Original Code is
|
||||
- Florian QUEZE <florian@instantbird.org>.
|
||||
- Portions created by the Initial Developer are Copyright (C) 2007
|
||||
- the Initial Developer. All Rights Reserved.
|
||||
-
|
||||
- Contributor(s):
|
||||
-
|
||||
- Alternatively, the contents of this file may be used under the terms of
|
||||
- either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
- in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
- of those above. If you wish to allow use of your version of this file only
|
||||
- under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
- use your version of this file under the terms of the MPL, indicate your
|
||||
- decision by deleting the provisions above and replace them with the notice
|
||||
- and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
- the provisions above, a recipient may use your version of this file under
|
||||
- the terms of any one of the MPL, the GPL or the LGPL.
|
||||
-
|
||||
- ***** END LICENSE BLOCK ***** -->
|
||||
|
||||
|
||||
<!DOCTYPE bindings>
|
||||
|
||||
<bindings id="animBindings"
|
||||
xmlns="http://www.mozilla.org/xbl"
|
||||
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:xbl="http://www.mozilla.org/xbl">
|
||||
|
||||
<!-- inspired from "chrome://global/content/bindings/tabbox.xml#tabbrowser-tabs"> -->
|
||||
|
||||
<binding id="anim" extends="chrome://global/content/bindings/general.xml#image">
|
||||
<implementation implements="nsITimerCallback">
|
||||
<destructor>
|
||||
<![CDATA[
|
||||
if (this._animateTimer) {
|
||||
this._animateTimer.cancel();
|
||||
this._animateTimer = null;
|
||||
}
|
||||
]]>
|
||||
</destructor>
|
||||
|
||||
<field name="_animateTimer">null</field>
|
||||
<field name="_animateStep">24</field>
|
||||
<field name="_animateDelay">45</field>
|
||||
<field name="_animateDown">true</field>
|
||||
<field name="_animatePercents">
|
||||
[1.00, 0.85, 0.80, 0.75, 0.71,
|
||||
0.68, 0.65, 0.62, 0.59, 0.57,
|
||||
0.54, 0.52, 0.50, 0.47, 0.45,
|
||||
0.44, 0.42, 0.40, 0.38, 0.37,
|
||||
0.35, 0.34, 0.32, 0.31, 0.30]
|
||||
</field>
|
||||
|
||||
<method name="notify">
|
||||
<parameter name="aTimer"/>
|
||||
<body><![CDATA[
|
||||
if (!document) {
|
||||
aTimer.cancel();
|
||||
this._animateTimer = null;
|
||||
}
|
||||
var percent = this._animatePercents[this._animateStep];
|
||||
this.style.opacity = percent;
|
||||
|
||||
if (this._animateDown) {
|
||||
if (--this._animateStep < 0) {
|
||||
this._animateDown = false;
|
||||
this._animateStep = 0;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (++this._animateStep > this._animatePercents.length - 1) {
|
||||
this._animateDown = true;
|
||||
this._animateStep = this._animatePercents.length - 1;
|
||||
}
|
||||
}
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<method name="animate">
|
||||
<body><![CDATA[
|
||||
const Ci = Components.interfaces;
|
||||
this._animateTimer = Components.classes["@mozilla.org/timer;1"]
|
||||
.createInstance(Ci.nsITimer);
|
||||
this._animateTimer.initWithCallback(this, this._animateDelay,
|
||||
Ci.nsITimer.TYPE_REPEATING_SLACK);
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<method name="stop">
|
||||
<body><![CDATA[
|
||||
if (this._animateTimer) {
|
||||
this._animateTimer.cancel();
|
||||
this._animateTimer = null;
|
||||
}
|
||||
]]></body>
|
||||
</method>
|
||||
</implementation>
|
||||
</binding>
|
||||
</bindings>
|
|
@ -0,0 +1,44 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is the Instantbird messenging client, released
|
||||
* 2007.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Florian QUEZE <florian@instantbird.org>.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2007
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
buddy {
|
||||
-moz-binding: url("chrome://instantbird/content/buddy.xml#buddy");
|
||||
}
|
||||
|
||||
group {
|
||||
-moz-binding: url("chrome://instantbird/content/group.xml#group");
|
||||
}
|
|
@ -0,0 +1,244 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is the Instantbird messenging client, released
|
||||
* 2007.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Florian QUEZE <florian@instantbird.org>.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2007
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
const events = ["buddy-signed-on",
|
||||
"buddy-signed-off",
|
||||
"buddy-removed",
|
||||
"buddy-away",
|
||||
"buddy-idle",
|
||||
"account-connected",
|
||||
"account-disconnected",
|
||||
"new-text",
|
||||
"new-conversation",
|
||||
"purple-quit"];
|
||||
|
||||
const autoJoinPref = "autoJoin";
|
||||
|
||||
var buddyList = {
|
||||
observe: function bl_observe(aBuddy, aTopic, aMsg) {
|
||||
//dump("received signal: " + aTopic + "\n");
|
||||
|
||||
if (aTopic == "purple-quit") {
|
||||
window.close();
|
||||
return;
|
||||
}
|
||||
|
||||
if (aTopic == "new-text" || aTopic == "new-conversation") {
|
||||
/*
|
||||
var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
|
||||
.getService(Components.interfaces.nsIWindowMediator);
|
||||
var win = wm.getMostRecentWindow("Messenger:convs");
|
||||
*/
|
||||
if (this.win && this.win.closed)
|
||||
this.win = null;
|
||||
|
||||
if (!this.win) {
|
||||
this.win = window.open(convWindow, "Conversations", "chrome,resizable");
|
||||
this.win.pendingNotifications = [{object: aBuddy, topic: aTopic, msg: aMsg}];
|
||||
}
|
||||
else if (this.win.pendingNotifications)
|
||||
this.win.pendingNotifications.push({object: aBuddy, topic: aTopic, msg: aMsg});
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (aTopic == "account-connected" || aTopic == "account-disconnected") {
|
||||
var account = aBuddy.QueryInterface(Ci.purpleIAccount);
|
||||
if (account.protocol.id == "prpl-irc") {
|
||||
this.checkForIrcAccount();
|
||||
if (aTopic == "account-connected") {
|
||||
var branch = Components.classes["@mozilla.org/preferences-service;1"]
|
||||
.getService(Ci.nsIPrefService)
|
||||
.getBranch("messenger.account." +
|
||||
account.id + ".");
|
||||
if (branch.prefHasUserValue(autoJoinPref)) {
|
||||
var autojoin = branch.getCharPref(autoJoinPref);
|
||||
if (autojoin) {
|
||||
autojoin = autojoin.split(",");
|
||||
for (var i = 0; i < autojoin.length; ++i)
|
||||
account.joinChat(autojoin[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
this.checkNotDisconnected();
|
||||
return;
|
||||
}
|
||||
|
||||
var pab = aBuddy.QueryInterface(Ci.purpleIAccountBuddy);
|
||||
var group = pab.tag;
|
||||
var groupId = "group" + group.id;
|
||||
var groupElt = document.getElementById(groupId);
|
||||
if (aTopic == "buddy-signed-on") {
|
||||
if (!groupElt) {
|
||||
groupElt = document.createElement("group");
|
||||
var parent = document.getElementById("buddylistbox");
|
||||
parent.appendChild(groupElt);
|
||||
groupElt.build(group);
|
||||
}
|
||||
groupElt.addBuddy(pab);
|
||||
return;
|
||||
}
|
||||
|
||||
if (aTopic == "buddy-signed-off" ||
|
||||
(aTopic == "buddy-removed" && groupElt)) {
|
||||
groupElt.signedOff(pab);
|
||||
}
|
||||
|
||||
if (aTopic == "buddy-idle" || aTopic == "buddy-away")
|
||||
groupElt.updateBuddy(pab);
|
||||
},
|
||||
|
||||
getAccounts: function bl_getAccounts() {
|
||||
var pcs = Components.classes["@instantbird.org/purple/core;1"]
|
||||
.getService(Ci.purpleICoreService);
|
||||
return getIter(pcs.getAccounts, Ci.purpleIAccount);
|
||||
},
|
||||
checkNotDisconnected: function bl_checkNotDisconnected() {
|
||||
var addBuddyItem = document.getElementById("addBuddyMenuItem");
|
||||
|
||||
for (let acc in this.getAccounts())
|
||||
if (acc.connected || acc.connecting) {
|
||||
addBuddyItem.disabled = false;
|
||||
return;
|
||||
}
|
||||
|
||||
addBuddyItem.disabled = true;
|
||||
menus.accounts();
|
||||
},
|
||||
checkForIrcAccount: function bl_checkForIrcAccount() {
|
||||
var joinChatItem = document.getElementById("joinChatMenuItem");
|
||||
|
||||
for (let acc in this.getAccounts())
|
||||
if (acc.connected && acc.protocol.id == "prpl-irc") {
|
||||
joinChatItem.disabled = false;
|
||||
return;
|
||||
}
|
||||
|
||||
joinChatItem.disabled = true;
|
||||
},
|
||||
|
||||
load: function bl_load() {
|
||||
initPurpleCore();
|
||||
buddyList.checkNotDisconnected();
|
||||
buddyList.checkForIrcAccount();
|
||||
addObservers(buddyList, events);
|
||||
this.addEventListener("unload", buddyList.unload, false);
|
||||
},
|
||||
unload: function bl_unload() {
|
||||
removeObservers(buddyList, events);
|
||||
uninitPurpleCore();
|
||||
},
|
||||
|
||||
getAway: function bl_getAway() {
|
||||
// prompt the user to enter an away message
|
||||
var prompts = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
|
||||
.getService(Components.interfaces.nsIPromptService);
|
||||
var bundle = document.getElementById("awayBundle");
|
||||
var message = {value: bundle.getString("away.default.message")};
|
||||
if (!prompts.prompt(window, bundle.getString("away.prompt.title"),
|
||||
bundle.getString("away.prompt.message"), message,
|
||||
null, {value: false}))
|
||||
return; // the user canceled
|
||||
|
||||
// actually get away
|
||||
var pcs = Components.classes["@instantbird.org/purple/core;1"]
|
||||
.getService(Components.interfaces.purpleICoreService);
|
||||
pcs.away(message.value);
|
||||
|
||||
// display the notification on the buddy list
|
||||
var buttons = [{
|
||||
accessKey: "",
|
||||
label: bundle.getString("away.back.button"),
|
||||
popup: null,
|
||||
callback: buddyList.getBack
|
||||
}];
|
||||
var nbox = document.getElementById("buddyListMsg");
|
||||
var notif = nbox.appendNotification(message.value, null,
|
||||
"chrome://instantbird/skin/away-16.png",
|
||||
nbox.PRIORITY_INFO_MEDIUM, buttons);
|
||||
notif.setAttribute("hideclose", "true");
|
||||
document.getElementById("getAwayMenuItem").disabled = true;
|
||||
},
|
||||
getBack: function bl_getBack() {
|
||||
var pcs = Components.classes["@instantbird.org/purple/core;1"]
|
||||
.getService(Components.interfaces.purpleICoreService);
|
||||
pcs.back(null);
|
||||
document.getElementById("getAwayMenuItem").disabled = false;
|
||||
},
|
||||
|
||||
// Handle key pressing
|
||||
keyPress: function bl_keyPress(aEvent) {
|
||||
switch (aEvent.keyCode) {
|
||||
|
||||
// If Enter or Return is pressed, open a new conversation
|
||||
case aEvent.DOM_VK_RETURN:
|
||||
case aEvent.DOM_VK_ENTER:
|
||||
var item = document.getElementById("buddylistbox").selectedItem;
|
||||
if (item.localName == "buddy")
|
||||
item.openConversation();
|
||||
break;
|
||||
}
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
function initPurpleCore()
|
||||
{
|
||||
try {
|
||||
var pcs = Components.classes["@instantbird.org/purple/core;1"]
|
||||
.getService(Ci.purpleICoreService);
|
||||
pcs.init();
|
||||
}
|
||||
catch (e) {
|
||||
alert(e);
|
||||
}
|
||||
}
|
||||
|
||||
function uninitPurpleCore()
|
||||
{
|
||||
try {
|
||||
var pcs = Components.classes["@instantbird.org/purple/core;1"]
|
||||
.getService(Ci.purpleICoreService);
|
||||
pcs.quit();
|
||||
}
|
||||
catch (e) {
|
||||
alert(e);
|
||||
}
|
||||
}
|
||||
|
||||
this.addEventListener("load", buddyList.load, false);
|
|
@ -0,0 +1,105 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- ***** BEGIN LICENSE BLOCK *****
|
||||
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
-
|
||||
- The contents of this file are subject to the Mozilla Public License Version
|
||||
- 1.1 (the "License"); you may not use this file except in compliance with
|
||||
- the License. You may obtain a copy of the License at
|
||||
- http://www.mozilla.org/MPL/
|
||||
-
|
||||
- Software distributed under the License is distributed on an "AS IS" basis,
|
||||
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
- for the specific language governing rights and limitations under the
|
||||
- License.
|
||||
-
|
||||
- The Original Code is the Instantbird messenging client, released
|
||||
- 2007.
|
||||
-
|
||||
- The Initial Developer of the Original Code is
|
||||
- Florian QUEZE <florian@instantbird.org>.
|
||||
- Portions created by the Initial Developer are Copyright (C) 2007
|
||||
- the Initial Developer. All Rights Reserved.
|
||||
-
|
||||
- Contributor(s):
|
||||
-
|
||||
- Alternatively, the contents of this file may be used under the terms of
|
||||
- either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
- in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
- of those above. If you wish to allow use of your version of this file only
|
||||
- under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
- use your version of this file under the terms of the MPL, indicate your
|
||||
- decision by deleting the provisions above and replace them with the notice
|
||||
- and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
- the provisions above, a recipient may use your version of this file under
|
||||
- the terms of any one of the MPL, the GPL or the LGPL.
|
||||
-
|
||||
- ***** END LICENSE BLOCK ***** -->
|
||||
|
||||
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://instantbird/skin/" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://instantbird/content/blist.css" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://instantbird/skin/blist.css" type="text/css"?>
|
||||
|
||||
<!DOCTYPE window [
|
||||
<!ENTITY % instantbirdDTD SYSTEM "chrome://instantbird/locale/instantbird.dtd">
|
||||
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
|
||||
%instantbirdDTD;
|
||||
%brandDTD;
|
||||
]>
|
||||
|
||||
<window
|
||||
id = "instantbird"
|
||||
title = "&blist.title;"
|
||||
width = "200"
|
||||
height = "600"
|
||||
persist= "width height screenX screenY"
|
||||
xmlns = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
<script type="application/javascript" src="chrome://instantbird/content/utilities.js"/>
|
||||
<script type="application/javascript" src="chrome://instantbird/content/blist.js"/>
|
||||
<script type="application/javascript" src="chrome://instantbird/content/menus.js"/>
|
||||
<script type="application/javascript" src="chrome://instantbird/content/sound.js"/>
|
||||
|
||||
<stringbundle id="awayBundle" src="chrome://instantbird/locale/away.properties"/>
|
||||
|
||||
<commandset id="maincommandset">
|
||||
<command id="accountmanager" oncommand="menus.accounts()"/>
|
||||
</commandset>
|
||||
|
||||
<keyset id="mainkeyset">
|
||||
<key id="accountsetup" key="&account.commandkey;" command="accountmenu" modifiers="accel"/>
|
||||
</keyset>
|
||||
|
||||
|
||||
<menubar id="blistMenubar">
|
||||
<menu label="&file.menu;" id="fileMenu" accesskey="&file.accesskey;">
|
||||
<menupopup id="fileMenuPopup">
|
||||
<menuitem id="addBuddyMenuItem" label="&addBuddy;" oncommand="menus.addBuddy()"/>
|
||||
<menuitem id="joinChatMenuItem" label="&joinChat;" oncommand="menus.joinChat()"/>
|
||||
<menuseparator/>
|
||||
<menuitem id="getAwayMenuItem" label="&getAway;" oncommand="menus.getAway()"/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
<menu label="&tools.menu;" id="toolsMenu" accesskey="&tools.accesskey;">
|
||||
<menupopup id="toolsMenuPopup">
|
||||
<menuitem id="soundsMenuItem" label="&sounds;" oncommand="menus.toggleSounds()" type="checkbox"/>
|
||||
<menuitem id="accountsMenuItem" label="&accountManager;" command="accountmanager" key="accountsetup" accesskey="&account.accesskey;"/>
|
||||
<menuseparator/>
|
||||
<menuitem id="addonsMenuItem" label="&addonManager;" oncommand="menus.addons()"/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
<menu label="&help.menu;" id="aboutSeparator"> <!-- this id ensure it gets hidden on mac -->
|
||||
<menupopup id="helpMenuPopup">
|
||||
<menuitem id="aboutName" label="&about.menu;" oncommand="menus.about()"/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
</menubar>
|
||||
|
||||
<notificationbox id="buddyListMsg" flex="1">
|
||||
<richlistbox id="buddylistbox" flex="1" onkeypress="buddyList.keyPress(event);"/>
|
||||
</notificationbox>
|
||||
|
||||
<statusbar>
|
||||
<statusbarpanel id="status" label="" crop="end" flex="1"/>
|
||||
</statusbar>
|
||||
</window>
|
|
@ -0,0 +1,198 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- ***** BEGIN LICENSE BLOCK *****
|
||||
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
-
|
||||
- The contents of this file are subject to the Mozilla Public License Version
|
||||
- 1.1 (the "License"); you may not use this file except in compliance with
|
||||
- the License. You may obtain a copy of the License at
|
||||
- http://www.mozilla.org/MPL/
|
||||
-
|
||||
- Software distributed under the License is distributed on an "AS IS" basis,
|
||||
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
- for the specific language governing rights and limitations under the
|
||||
- License.
|
||||
-
|
||||
- The Original Code is the Instantbird messenging client, released
|
||||
- 2007.
|
||||
-
|
||||
- The Initial Developer of the Original Code is
|
||||
- Florian QUEZE <florian@instantbird.org>.
|
||||
- Portions created by the Initial Developer are Copyright (C) 2007
|
||||
- the Initial Developer. All Rights Reserved.
|
||||
-
|
||||
- Contributor(s):
|
||||
-
|
||||
- Alternatively, the contents of this file may be used under the terms of
|
||||
- either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
- in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
- of those above. If you wish to allow use of your version of this file only
|
||||
- under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
- use your version of this file under the terms of the MPL, indicate your
|
||||
- decision by deleting the provisions above and replace them with the notice
|
||||
- and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
- the provisions above, a recipient may use your version of this file under
|
||||
- the terms of any one of the MPL, the GPL or the LGPL.
|
||||
-
|
||||
- ***** END LICENSE BLOCK ***** -->
|
||||
|
||||
|
||||
<!DOCTYPE bindings>
|
||||
|
||||
<bindings id="buddyBindings"
|
||||
xmlns="http://www.mozilla.org/xbl"
|
||||
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:xbl="http://www.mozilla.org/xbl">
|
||||
|
||||
<binding id="buddy" extends="chrome://global/content/bindings/richlistbox.xml#richlistitem">
|
||||
<content>
|
||||
<xul:hbox>
|
||||
<xul:stack class="prplBuddyIcon">
|
||||
<xul:image xbl:inherits="src=icon" class="protoIcon"/>
|
||||
<xul:image src="chrome://instantbird/skin/away.png"
|
||||
class="statusIcon"/>
|
||||
</xul:stack>
|
||||
<xul:label class="buddyDisplayName" xbl:inherits="value=displayname"/>
|
||||
<xul:textbox collapsed="true" class="plain" xbl:inherits="value=displayname"/>
|
||||
</xul:hbox>
|
||||
</content>
|
||||
<implementation>
|
||||
<constructor>
|
||||
<![CDATA[
|
||||
//dump("constructing buddy\n");
|
||||
]]>
|
||||
</constructor>
|
||||
<destructor>
|
||||
<![CDATA[
|
||||
//dump("destructing buddy\n");
|
||||
]]>
|
||||
</destructor>
|
||||
|
||||
<method name="build">
|
||||
<parameter name="aBuddy"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
this.buddyId = aBuddy.id;
|
||||
this.name = aBuddy.name;
|
||||
this.alias = aBuddy.alias;
|
||||
this.setAttribute("displayname", this.alias || this.name);
|
||||
//this.setAttribute("id", "buddy" + this.buddyId);
|
||||
this.prpl = aBuddy.getAccount(0).protocol.id;
|
||||
this.setAttribute("icon", "chrome://instantbird/skin/prpl/" +
|
||||
this.prpl + ".png");
|
||||
this.accounts = { };
|
||||
this.update();
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
||||
<method name="update">
|
||||
<body>
|
||||
<![CDATA[
|
||||
var away = true;
|
||||
for (var id in this.accounts)
|
||||
if (this.accounts[id].available) {
|
||||
away = false;
|
||||
break;
|
||||
}
|
||||
if (away) {
|
||||
var status;
|
||||
for (var id in this.accounts) {
|
||||
status = this.accounts[id].status;
|
||||
if (status)
|
||||
break;
|
||||
}
|
||||
this.setAttribute("away", "true");
|
||||
if (status)
|
||||
this.tooltipText = this.name + ': ' + status;
|
||||
}
|
||||
else {
|
||||
this.removeAttribute("away");
|
||||
this.tooltipText = this.name;
|
||||
}
|
||||
|
||||
var idle = true;
|
||||
for (var id in this.accounts)
|
||||
if (!this.accounts[id].idle) {
|
||||
idle = false;
|
||||
break;
|
||||
}
|
||||
if (idle)
|
||||
this.setAttribute("idle", "true");
|
||||
else
|
||||
this.removeAttribute("idle");
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
||||
<method name="addAccount">
|
||||
<parameter name="aPab"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
var id = aPab.account.id;
|
||||
if (id in this.accounts)
|
||||
throw "This buddy has already been added";
|
||||
this.accounts[id] = aPab;
|
||||
this.update();
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
||||
<method name="removeAccount">
|
||||
<parameter name="aPab"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
var id = aPab.account.id;
|
||||
if (!(id in this.accounts))
|
||||
return; // this used to throw, but this seems to be harmless
|
||||
//throw "This buddy (" + aPab.buddy.name +
|
||||
") has not been added for account " + aPab.account.name;
|
||||
|
||||
delete this.accounts[id];
|
||||
|
||||
if (this.accounts.__count__) {
|
||||
this.update();
|
||||
return false;
|
||||
}
|
||||
|
||||
// No account left, this node is now useless, remove it
|
||||
this.parentNode.removeChild(this);
|
||||
return true;
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
||||
<method name="openConversation">
|
||||
<body>
|
||||
<![CDATA[
|
||||
var pcs = Components.classes["@instantbird.org/purple/core;1"]
|
||||
.getService(Components.interfaces.purpleICoreService);
|
||||
var buddy = pcs.getBuddyById(this.buddyId);
|
||||
var conv;
|
||||
for (var id in this.accounts) {
|
||||
conv = this.accounts[id].createConversation();
|
||||
break;
|
||||
}
|
||||
|
||||
var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
|
||||
.getService(Components.interfaces.nsIWindowMediator);
|
||||
var convWindow = wm.getMostRecentWindow("Messenger:convs");
|
||||
if (convWindow) {
|
||||
convWindow.msgObserver.focusConv(conv);
|
||||
convWindow.focus();
|
||||
}
|
||||
else {
|
||||
// the conversation window has been closed. Force reopening.
|
||||
var os = Components.classes["@mozilla.org/observer-service;1"]
|
||||
.getService(Components.interfaces.nsIObserverService);
|
||||
os.notifyObservers(conv, "new-conversation", null);
|
||||
}
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
</implementation>
|
||||
<handlers>
|
||||
<handler event="click" clickcount="2" action="openConversation();"/>
|
||||
</handlers>
|
||||
</binding>
|
||||
</bindings>
|
|
@ -0,0 +1,46 @@
|
|||
<!-- ***** BEGIN LICENSE BLOCK *****
|
||||
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
-
|
||||
- The contents of this file are subject to the Mozilla Public License Version
|
||||
- 1.1 (the "License"); you may not use this file except in compliance with
|
||||
- the License. You may obtain a copy of the License at
|
||||
- http://www.mozilla.org/MPL/
|
||||
-
|
||||
- Software distributed under the License is distributed on an "AS IS" basis,
|
||||
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
- for the specific language governing rights and limitations under the
|
||||
- License.
|
||||
-
|
||||
- The Original Code is the Instantbird messenging client, released
|
||||
- 2007.
|
||||
-
|
||||
- The Initial Developer of the Original Code is
|
||||
- Florian QUEZE <florian@instantbird.org>.
|
||||
- Portions created by the Initial Developer are Copyright (C) 2007
|
||||
- the Initial Developer. All Rights Reserved.
|
||||
-
|
||||
- Contributor(s):
|
||||
-
|
||||
- Alternatively, the contents of this file may be used under the terms of
|
||||
- either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
- in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
- of those above. If you wish to allow use of your version of this file only
|
||||
- under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
- use your version of this file under the terms of the MPL, indicate your
|
||||
- decision by deleting the provisions above and replace them with the notice
|
||||
- and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
- the provisions above, a recipient may use your version of this file under
|
||||
- the terms of any one of the MPL, the GPL or the LGPL.
|
||||
-
|
||||
- ***** END LICENSE BLOCK ***** -->
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" href="chrome://instantbird/skin/conv.css" />
|
||||
</head>
|
||||
<body id="ibcontent">
|
||||
<h1 id="welcome"><img src="chrome://instantbird/skin/instantbird.png"/></h1>
|
||||
<hr />
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,398 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- ***** BEGIN LICENSE BLOCK *****
|
||||
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
-
|
||||
- The contents of this file are subject to the Mozilla Public License Version
|
||||
- 1.1 (the "License"); you may not use this file except in compliance with
|
||||
- the License. You may obtain a copy of the License at
|
||||
- http://www.mozilla.org/MPL/
|
||||
-
|
||||
- Software distributed under the License is distributed on an "AS IS" basis,
|
||||
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
- for the specific language governing rights and limitations under the
|
||||
- License.
|
||||
-
|
||||
- The Original Code is the Instantbird messenging client, released
|
||||
- 2007.
|
||||
-
|
||||
- The Initial Developer of the Original Code is
|
||||
- Florian QUEZE <florian@instantbird.org>.
|
||||
- Portions created by the Initial Developer are Copyright (C) 2007
|
||||
- the Initial Developer. All Rights Reserved.
|
||||
-
|
||||
- Contributor(s):
|
||||
-
|
||||
- Alternatively, the contents of this file may be used under the terms of
|
||||
- either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
- in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
- of those above. If you wish to allow use of your version of this file only
|
||||
- under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
- use your version of this file under the terms of the MPL, indicate your
|
||||
- decision by deleting the provisions above and replace them with the notice
|
||||
- and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
- the provisions above, a recipient may use your version of this file under
|
||||
- the terms of any one of the MPL, the GPL or the LGPL.
|
||||
-
|
||||
- ***** END LICENSE BLOCK ***** -->
|
||||
|
||||
|
||||
<!DOCTYPE bindings [
|
||||
<!ENTITY % instantbirdDTD SYSTEM "chrome://instantbird/locale/instantbird.dtd">
|
||||
%instantbirdDTD;
|
||||
]>
|
||||
|
||||
<bindings id="conversationBindings"
|
||||
xmlns="http://www.mozilla.org/xbl"
|
||||
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:xbl="http://www.mozilla.org/xbl">
|
||||
|
||||
<binding id="conversation">
|
||||
<resources>
|
||||
<stylesheet src="chrome://instantbird/skin/instantbird.css"/>
|
||||
</resources>
|
||||
<content>
|
||||
<xul:vbox class="convBox" flex="1">
|
||||
<xul:browser flex="1" class="browser" anonid="browser" type="content"/>
|
||||
<xul:splitter anonid="splitter" class="splitter"/>
|
||||
<xul:deck anonid="conv-bottom" class="conv-bottom" selectedIndex="1">
|
||||
<xul:vbox>
|
||||
<xul:toolbar anonid="conv-toolbar">
|
||||
<xul:toolbarbutton label="Bold" oncommand="this.editorDoCommand('bold');"/>
|
||||
<xul:toolbarbutton label="Italic" oncommand="this.editorDoCommand('italic');"/>
|
||||
<xul:toolbarbutton label="Underline" oncommand="this.editorDoCommand('underline');"/>
|
||||
</xul:toolbar>
|
||||
<xul:editor anonid="editor" editortype="html" src="about:blank" flex="1"/>
|
||||
</xul:vbox>
|
||||
<xul:textbox anonid="input" multiline="true" spellcheck="true" flex="1"/>
|
||||
</xul:deck>
|
||||
</xul:vbox>
|
||||
</content>
|
||||
<implementation implements="nsIWebProgressListener">
|
||||
<constructor>
|
||||
<![CDATA[
|
||||
document.getAnonymousElementByAttribute(this, "anonid", "input")
|
||||
.addEventListener("keypress", this.onSendMsg, false);
|
||||
|
||||
var browser = document.getAnonymousElementByAttribute(this, "anonid", "browser");
|
||||
var docShell = browser.docShell;
|
||||
docShell.allowJavascript = false;
|
||||
docShell.allowAuth = false;
|
||||
docShell.allowPlugins = false;
|
||||
docShell.allowMetaRedirects = false;
|
||||
docShell.allowSubframes = false;
|
||||
docShell.allowImages = false;
|
||||
var url = 'data:text/html,<html><head><link rel="stylesheet" type="text/css" href="chrome://instantbird/skin/conv.css" /></head>';
|
||||
url += '<body id="ibcontent"></body></html>';
|
||||
browser.setAttribute("src", url);//"chrome://instantbird/content/conv.html"
|
||||
browser.addProgressListener(this);
|
||||
|
||||
var editor = document.getAnonymousElementByAttribute(this, "anonid", "editor");
|
||||
editor.addEventListener("keypress", this.onSendHTMLMsg, false);
|
||||
//this doesn't work at the moment
|
||||
//editor.contentDocument.designMode = "on";
|
||||
//setTimeout(function() { editor.contentWindow.focus(); }, 100);
|
||||
]]>
|
||||
</constructor>
|
||||
|
||||
<destructor>
|
||||
<![CDATA[
|
||||
this._conv.close();
|
||||
]]>
|
||||
</destructor>
|
||||
|
||||
<field name="loaded">false</field>
|
||||
<field name="messageQueue">[]</field>
|
||||
|
||||
<method name="addMsg">
|
||||
<parameter name="aMsg"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
if (this.loaded)
|
||||
this._addMsg(aMsg);
|
||||
else
|
||||
this.messageQueue.push(aMsg);
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
||||
<method name="_addMsg">
|
||||
<parameter name="aMsg"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
var time = aMsg.time;
|
||||
var name = aMsg.alias ||aMsg.who;
|
||||
var pseudoClass = "pseudo";
|
||||
var color = "";
|
||||
if (aMsg.incoming) {
|
||||
var nick = aMsg.conversation.isChat && name.match(/[a-zA-Z0-9]+/);
|
||||
if (nick) {
|
||||
nick = nick[0].toLowerCase();
|
||||
var weight = 10;
|
||||
var res = 0;
|
||||
for (var i = 0; i < nick.length; ++i) {
|
||||
var char = nick.charCodeAt(i) - 47;
|
||||
if (char > 10)
|
||||
char -= 39;
|
||||
// now char contains a value between 1 and 36
|
||||
res += char * weight;
|
||||
weight *= 0.52; //arbitrary
|
||||
}
|
||||
res = Math.round(res) % 360;
|
||||
color = " style=\"color: hsl(" + res + ", 100%, 50%)\"";
|
||||
}
|
||||
else
|
||||
pseudoClass += " incoming";
|
||||
}
|
||||
else
|
||||
if (aMsg.outgoing)
|
||||
pseudoClass += " outgoing";
|
||||
|
||||
var msgClass = [];
|
||||
if (aMsg.system)
|
||||
msgClass.push("system");
|
||||
if (aMsg.containsNick)
|
||||
msgClass.push("nick");
|
||||
var txt = '<span class="date">' + time + '</span> ';
|
||||
|
||||
var msg = aMsg.message;
|
||||
if (!aMsg.noLinkification) {
|
||||
msg = Components.classes["@mozilla.org/txttohtmlconv;1"]
|
||||
.getService(Ci.mozITXTToHTMLConv)
|
||||
.scanHTML(msg, 2)
|
||||
.replace(/&(apos|quot);/g, "&$1;");
|
||||
}
|
||||
|
||||
var me = msg.match("^/me(.*)");
|
||||
if (!aMsg.system)
|
||||
txt += '<span class="' + pseudoClass + '"' + color + '>' + name + (me ? "</span> " : ":</span> ");
|
||||
|
||||
txt += (me ? me[1] : msg).replace(/\n/g, "<br/>");
|
||||
if (me)
|
||||
msgClass.push("me");
|
||||
|
||||
this._addTxt(txt, msgClass.join(" "));
|
||||
|
||||
if (this.tab && !this.tab.selected && aMsg.incoming && !aMsg.system) {
|
||||
if (aMsg.conversation.isChat && aMsg.containsNick)
|
||||
this.tab.setAttribute("attention", "true");
|
||||
else
|
||||
this.tab.setAttribute("unread", "true");
|
||||
}
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
||||
<method name="_addTxt">
|
||||
<parameter name="aTxt"/>
|
||||
<parameter name="aClass"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
if (!this.loaded)
|
||||
throw "Trying to append text to a not yet loaded browser";
|
||||
|
||||
var browser = document.getAnonymousElementByAttribute(this, "anonid", "browser");
|
||||
var doc = browser.contentDocument;
|
||||
var elt = doc.getElementById("ibcontent");
|
||||
var newElt = doc.createElement("p");
|
||||
newElt.innerHTML = aTxt;
|
||||
newElt.className = aClass;
|
||||
var shouldScroll = elt.scrollHeight == elt.scrollTop + elt.clientHeight;
|
||||
elt.appendChild(newElt);
|
||||
if (shouldScroll)
|
||||
newElt.scrollIntoView(true);
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
||||
<method name="sendMsg">
|
||||
<parameter name="aMsg"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
var re = /^\/raw (.*)/;
|
||||
var msg = aMsg.match(re);
|
||||
if (msg)
|
||||
msg = msg[1];
|
||||
else
|
||||
msg = Components.classes["@mozilla.org/txttohtmlconv;1"]
|
||||
.getService(Ci.mozITXTToHTMLConv)
|
||||
.scanTXT(aMsg, 0);
|
||||
this._conv.sendMsg(msg);
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
||||
<method name="onSendMsg">
|
||||
<parameter name="event"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
if (event.keyCode != 13)
|
||||
return;
|
||||
|
||||
/* this method is called by an eventListener.
|
||||
This points to the textbox element. */
|
||||
var conv = this;
|
||||
while (conv.localName != "conversation")
|
||||
conv = conv.parentNode;
|
||||
if (!event.ctrlKey && !event.shiftKey && !event.altKey) {
|
||||
conv.sendMsg(this.value);
|
||||
this.value = "";
|
||||
event.preventDefault();
|
||||
}
|
||||
else if (!event.shiftKey)
|
||||
this.value += "\n";
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
||||
<method name="onSendHTMLMsg">
|
||||
<parameter name="event"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
if (event.keyCode != 13)
|
||||
return;
|
||||
|
||||
/* this method is called by an eventListener.
|
||||
This points to the textbox element. */
|
||||
var conv = this;
|
||||
while (conv.localName != "conversation")
|
||||
conv = conv.parentNode;
|
||||
|
||||
var editor = this.getEditor(this.contentWindow);
|
||||
var docRoot = editor.rootElement;
|
||||
|
||||
if (!event.ctrlKey && !event.shiftKey && !event.altKey) {
|
||||
conv.sendMsg(docRoot.innerHTML);
|
||||
docRoot.innerHTML = "";
|
||||
event.preventDefault();
|
||||
}
|
||||
else {
|
||||
if (!event.shiftKey)
|
||||
// unfortunately, this doesn't work
|
||||
this.contentDocument.execCommand("inserthtml", false, "<br>");
|
||||
}
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
||||
<method name="editorDoCommand">
|
||||
<parameter name="aCmd"/>
|
||||
<parameter name="aHtml"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
var editor = document.getAnonymousElementByAttribute(this, "anonid", "editor");
|
||||
editor.contentDocument.execCommand(aCmd, false, aHtml);
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
||||
<!-- nsIWebProgressListener implementation -->
|
||||
<method name="onStateChange">
|
||||
<parameter name="aProgress"/>
|
||||
<parameter name="aRequest"/>
|
||||
<parameter name="aStateFlags"/>
|
||||
<parameter name="aStatus"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
const WPL = Components.interfaces.nsIWebProgressListener;
|
||||
if ((aStateFlags & WPL.STATE_IS_DOCUMENT) &&
|
||||
(aStateFlags & WPL.STATE_STOP)) {
|
||||
var browser = document.getAnonymousElementByAttribute(this, "anonid", "browser");
|
||||
browser.removeProgressListener(this);
|
||||
this.loaded = true;
|
||||
for (var i = 0; i < this.messageQueue.length; ++i)
|
||||
this._addMsg(this.messageQueue[i]);
|
||||
this.messageQueue = null;
|
||||
}
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
||||
<method name="onProgressChange">
|
||||
<parameter name="aProgress"/>
|
||||
<parameter name="aRequest"/>
|
||||
<parameter name="aCurSelf"/>
|
||||
<parameter name="aMaxSelf"/>
|
||||
<parameter name="aCurTotal"/>
|
||||
<parameter name="aMaxTotal"/>
|
||||
</method>
|
||||
|
||||
<method name="onLocationChange">
|
||||
<parameter name="aProgress"/>
|
||||
<parameter name="aRequest"/>
|
||||
<parameter name="aLocation"/>
|
||||
</method>
|
||||
|
||||
<method name="onStatusChange">
|
||||
<parameter name="aProgress"/>
|
||||
<parameter name="aRequest"/>
|
||||
<parameter name="aStatus"/>
|
||||
<parameter name="aMessage"/>
|
||||
</method>
|
||||
|
||||
<method name="onSecurityChange">
|
||||
<parameter name="aProgress"/>
|
||||
<parameter name="aRequest"/>
|
||||
<parameter name="aState"/>
|
||||
</method>
|
||||
|
||||
<property name="convId">
|
||||
<getter>
|
||||
<![CDATA[
|
||||
return this._conv.id;
|
||||
]]>
|
||||
</getter>
|
||||
</property>
|
||||
|
||||
<property name="conv">
|
||||
<getter>
|
||||
<![CDATA[
|
||||
return this._conv;
|
||||
]]>
|
||||
</getter>
|
||||
<setter>
|
||||
<![CDATA[
|
||||
this._conv = val;
|
||||
return val;
|
||||
]]>
|
||||
</setter>
|
||||
</property>
|
||||
</implementation>
|
||||
<handlers>
|
||||
<handler event="focus" phase="capturing">
|
||||
<![CDATA[
|
||||
if (event.originalTarget != this)
|
||||
return;
|
||||
if (!this.hasAttribute("focused")) {
|
||||
var input = document.getAnonymousElementByAttribute(this, "anonid", "input");
|
||||
this.setAttribute("focused", "true");
|
||||
//FIXME: check why it doesn't work without this timeout
|
||||
setTimeout(function () {input.focus(); }, 1);
|
||||
}
|
||||
]]>
|
||||
</handler>
|
||||
<handler event="blur" phase="capturing">
|
||||
<![CDATA[
|
||||
this.removeAttribute("focused");
|
||||
]]>
|
||||
</handler>
|
||||
</handlers>
|
||||
</binding>
|
||||
|
||||
<binding id="convtab" extends="chrome://global/content/bindings/tabbox.xml#tab">
|
||||
<resources>
|
||||
<stylesheet src="chrome://global/skin/tabbox.css"/>
|
||||
</resources>
|
||||
<content>
|
||||
<xul:hbox class="tab-image-left" xbl:inherits="selected"/>
|
||||
<xul:hbox flex="1" class="tab-image-middle" align="center" xbl:inherits="selected">
|
||||
<xul:stack class="tab-icon">
|
||||
<xul:image xbl:inherits="validate,src=image" class="tab-icon-image"/>
|
||||
<xul:image class="tab-extra-status"/>
|
||||
</xul:stack>
|
||||
<xul:label flex="1" xbl:inherits="value=label,crop,accesskey" crop="right" class="tab-text"/>
|
||||
</xul:hbox>
|
||||
<xul:hbox class="tab-image-right" xbl:inherits="selected"/>
|
||||
</content>
|
||||
</binding>
|
||||
</bindings>
|
|
@ -0,0 +1,260 @@
|
|||
<!-- -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is Thunderbird Credits.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Ben Goodger.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2004
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Ben Goodger <ben@mozilla.org>
|
||||
# David Baron <dbaron@mozilla.org>
|
||||
# Florian Quèze <florian@instantbird.org>
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
-->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
|
||||
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"
|
||||
[
|
||||
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
|
||||
%brandDTD;
|
||||
<!ENTITY % creditsDTD SYSTEM "chrome://instantbird/locale/credits.dtd">
|
||||
%creditsDTD;
|
||||
<!ENTITY % licenseDTD SYSTEM "chrome://global/locale/license.dtd">
|
||||
%licenseDTD;
|
||||
]
|
||||
>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>&credit.title;</title>
|
||||
|
||||
<style>
|
||||
html {
|
||||
background-color: white;
|
||||
color: black;
|
||||
}
|
||||
|
||||
* {
|
||||
cursor: default;
|
||||
-moz-user-select: none;
|
||||
}
|
||||
|
||||
#titleBox {
|
||||
position: fixed;
|
||||
left: 0px;
|
||||
top: 0px;
|
||||
right: 0px;
|
||||
bottom: auto;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
#footerBox {
|
||||
position: fixed;
|
||||
left: 0px;
|
||||
top: auto;
|
||||
right: 0px;
|
||||
bottom: 0px;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
#creditsBox {
|
||||
position: absolute;
|
||||
left: 0px;
|
||||
top: 0px;
|
||||
bottom:8px;
|
||||
overflow: hidden;
|
||||
z-index: 1;
|
||||
width: 280px;
|
||||
margin-left: 10px;
|
||||
margin-right: 10px;
|
||||
font-family: Arial, sans-serif;
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
#creditsBox > .title > .motto {
|
||||
margin-bottom: 180px;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-weight: bold;
|
||||
font-size: small;
|
||||
text-align: center;
|
||||
margin: 15px 0px 5px 0px;
|
||||
}
|
||||
|
||||
.creditsGroup {
|
||||
margin-bottom: 1px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.footnote {
|
||||
font-size: x-small;
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
h2.title {
|
||||
margin-top: 200px;
|
||||
margin-bottom: 100px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.motto {
|
||||
margin-top: 2px;
|
||||
font-style: italic;
|
||||
font-size: small;
|
||||
font-weight: normal;
|
||||
padding-left: 2em;
|
||||
}
|
||||
|
||||
#gecko {
|
||||
margin-top: 100px;
|
||||
margin-bottom: 100px;
|
||||
font-size: medium;
|
||||
}
|
||||
|
||||
a {
|
||||
color: blue;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
ul {
|
||||
margin-top: 0px;
|
||||
margin-left: 0px;
|
||||
padding-left: 0px;
|
||||
}
|
||||
|
||||
li {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
.center {
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script type="application/x-javascript" src="chrome://global/content/globalOverlay.js"></script>
|
||||
<script type="application/x-javascript">
|
||||
<![CDATA[
|
||||
|
||||
var gCreditsInterval = -1;
|
||||
|
||||
function uninit()
|
||||
{
|
||||
if (gCreditsInterval > -1)
|
||||
clearInterval(gCreditsInterval);
|
||||
}
|
||||
|
||||
function init()
|
||||
{
|
||||
var cb = document.getElementById("creditsBox");
|
||||
cb.scrollTop = 0;
|
||||
setTimeout(runCredits, 3000);
|
||||
}
|
||||
|
||||
function runCredits()
|
||||
{
|
||||
gCreditsInterval = setInterval("creditsCallback()", 25);
|
||||
}
|
||||
|
||||
function creditsCallback()
|
||||
{
|
||||
var cb = document.getElementById("creditsBox");
|
||||
var newtop = cb.scrollTop + 1;
|
||||
cb.scrollTop = newtop;
|
||||
if (cb.scrollTop != newtop) {
|
||||
// we're at the bottom
|
||||
clearInterval(gCreditsInterval);
|
||||
setTimeout(function() { cb.scrollTop = 0 }, 10000);
|
||||
}
|
||||
}
|
||||
|
||||
function openLicense()
|
||||
{
|
||||
var fileLocator =
|
||||
Components.classes["@mozilla.org/file/directory_service;1"].
|
||||
getService(Components.interfaces.nsIProperties);
|
||||
var appDir = fileLocator.get("XCurProcD", Components.interfaces.nsIFile);
|
||||
appDir.append("license.html");
|
||||
var protocolSvc =
|
||||
Components.classes["@mozilla.org/uriloader/external-protocol-service;1"].
|
||||
getService(Components.interfaces.nsIExternalProtocolService);
|
||||
var ioService = Components.classes["@mozilla.org/network/io-service;1"].
|
||||
getService(Components.interfaces.nsIIOService);
|
||||
var uri = ioService.newFileURI(appDir);
|
||||
protocolSvc.loadUrl(uri);
|
||||
}
|
||||
|
||||
]]>
|
||||
</script>
|
||||
</head>
|
||||
<body onload="init();" onunload="uninit();">
|
||||
<div id="titleBox">
|
||||
<img src="chrome://branding/content/about-credits.png" />
|
||||
</div>
|
||||
|
||||
<div id="creditsBox">
|
||||
<h2 class="title">&brandFullName;
|
||||
<div class="motto">&brandMotto;</div>
|
||||
</h2>
|
||||
|
||||
<div class="creditsGroup">
|
||||
<h3>&credit.leads;</h3>
|
||||
<div class="credit">Florian Quèze</div>
|
||||
<div class="credit">Quentin Castier</div>
|
||||
</div>
|
||||
|
||||
<div class="creditsGroup">
|
||||
<h3>&credit.thanks;</h3>
|
||||
<div class="credit">
|
||||
<ul>
|
||||
<li>Mozilla developers</li>
|
||||
<li>The Pidgin team</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
&credit.translation;
|
||||
|
||||
</div>
|
||||
|
||||
<p id="gecko" class="center">&credit.poweredByGecko;</p>
|
||||
|
||||
<p class="footnote">
|
||||
&brandFullName; &license.part0; ©2007-2008 &license.part1;
|
||||
<a href="" link="http://www.mozilla.org/credits/" onclick="visitLink(event); event.preventDefault();">&license.contrib;</a>,
|
||||
&license.part2;
|
||||
<a href="" onclick="openLicense(); event.preventDefault();">license</a>
|
||||
&license.part3;</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="footerBox">
|
||||
<img src="chrome://branding/content/about-footer.png"/>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,148 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- ***** BEGIN LICENSE BLOCK *****
|
||||
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
-
|
||||
- The contents of this file are subject to the Mozilla Public License Version
|
||||
- 1.1 (the "License"); you may not use this file except in compliance with
|
||||
- the License. You may obtain a copy of the License at
|
||||
- http://www.mozilla.org/MPL/
|
||||
-
|
||||
- Software distributed under the License is distributed on an "AS IS" basis,
|
||||
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
- for the specific language governing rights and limitations under the
|
||||
- License.
|
||||
-
|
||||
- The Original Code is the Instantbird messenging client, released
|
||||
- 2007.
|
||||
-
|
||||
- The Initial Developer of the Original Code is
|
||||
- Florian QUEZE <florian@instantbird.org>.
|
||||
- Portions created by the Initial Developer are Copyright (C) 2007
|
||||
- the Initial Developer. All Rights Reserved.
|
||||
-
|
||||
- Contributor(s):
|
||||
-
|
||||
- Alternatively, the contents of this file may be used under the terms of
|
||||
- either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
- in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
- of those above. If you wish to allow use of your version of this file only
|
||||
- under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
- use your version of this file under the terms of the MPL, indicate your
|
||||
- decision by deleting the provisions above and replace them with the notice
|
||||
- and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
- the provisions above, a recipient may use your version of this file under
|
||||
- the terms of any one of the MPL, the GPL or the LGPL.
|
||||
-
|
||||
- ***** END LICENSE BLOCK ***** -->
|
||||
|
||||
|
||||
<!DOCTYPE bindings>
|
||||
|
||||
<bindings id="groupBindings"
|
||||
xmlns="http://www.mozilla.org/xbl"
|
||||
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:xbl="http://www.mozilla.org/xbl">
|
||||
|
||||
<binding id="group" extends="chrome://global/content/bindings/richlistbox.xml#richlistitem">
|
||||
<content>
|
||||
<xul:hbox>
|
||||
<xul:label xbl:inherits="value=name"/>
|
||||
<xul:textbox collapsed="true" class="plain" xbl:inherits="value=displayname"/>
|
||||
</xul:hbox>
|
||||
</content>
|
||||
<implementation>
|
||||
<constructor>
|
||||
<![CDATA[
|
||||
//dump("constructing group\n");
|
||||
]]>
|
||||
</constructor>
|
||||
<destructor>
|
||||
<![CDATA[
|
||||
//dump("destructing group\n");
|
||||
]]>
|
||||
</destructor>
|
||||
|
||||
<method name="build">
|
||||
<parameter name="aGroup"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
this.groupId = aGroup.id;
|
||||
this.name = aGroup.name;
|
||||
this.buddies = [ ];
|
||||
this.setAttribute("id", "group" + this.groupId);
|
||||
this.setAttribute("name", this.name);
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
||||
<method name="addBuddy">
|
||||
<parameter name="aPab"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
var buddy = aPab.buddy;
|
||||
|
||||
var buddyElt;
|
||||
for (var i = 0; i < this.buddies.length; ++i) {
|
||||
if (this.buddies[i].buddyId == buddy.id) {
|
||||
buddyElt = this.buddies[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!buddyElt) {
|
||||
buddyElt = document.createElement("buddy");
|
||||
|
||||
var last = this;
|
||||
if (this.buddies.length)
|
||||
last = this.buddies[this.buddies.length - 1];
|
||||
|
||||
this.parentNode.insertBefore(buddyElt, last.nextSibling);
|
||||
buddyElt.build(aPab.buddy);
|
||||
this.buddies.push(buddyElt);
|
||||
}
|
||||
buddyElt.addAccount(aPab);
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
||||
<method name="signedOff">
|
||||
<parameter name="aPab"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
var buddy = aPab.buddy;
|
||||
|
||||
for (var i = 0; i < this.buddies.length; ++i) {
|
||||
if (this.buddies[i].buddyId == buddy.id) {
|
||||
if (this.buddies[i].removeAccount(aPab)) {
|
||||
// The buddy should be removed
|
||||
this.buddies.splice(i, 1);
|
||||
// Check if some buddy remain in the group, if empty remove it
|
||||
if (!this.buddies.length)
|
||||
this.parentNode.removeChild(this);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
||||
<method name="updateBuddy">
|
||||
<parameter name="aPab"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
var buddy = aPab.buddy;
|
||||
|
||||
for (var i = 0; i < this.buddies.length; ++i) {
|
||||
if (this.buddies[i].buddyId == buddy.id) {
|
||||
this.buddies[i].update();
|
||||
return;
|
||||
}
|
||||
}
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
</implementation>
|
||||
</binding>
|
||||
</bindings>
|
|
@ -0,0 +1,44 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is the Instantbird messenging client, released
|
||||
* 2007.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Florian QUEZE <florian@instantbird.org>.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2007
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
conversation {
|
||||
-moz-binding: url("chrome://instantbird/content/conversation.xml#conversation");
|
||||
}
|
||||
|
||||
convtab {
|
||||
-moz-binding: url("chrome://instantbird/content/conversation.xml#convtab");
|
||||
}
|
|
@ -0,0 +1,205 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is the Instantbird messenging client, released
|
||||
* 2007.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Florian QUEZE <florian@instantbird.org>.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2007
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
const events = ["new-text",
|
||||
"new-conversation",
|
||||
"purple-quit"];
|
||||
|
||||
var msgObserver = {
|
||||
convs: { },
|
||||
// Components.interfaces.nsIObserver
|
||||
observe: function mo_observe(aObject, aTopic, aData) {
|
||||
switch(aTopic) {
|
||||
case "purple-quit":
|
||||
window.close();
|
||||
break;
|
||||
|
||||
case "new-text":
|
||||
aObject.QueryInterface(Ci.purpleIMessage);
|
||||
var conv = aObject.conversation;
|
||||
var tab = this.convs[conv.id] || this.addConvTab(conv, conv.name);
|
||||
tab.addMsg(aObject);
|
||||
|
||||
if (aObject.incoming && !aObject.system &&
|
||||
(!aObject.conversation.isChat || aObject.containsNick))
|
||||
window.getAttention();
|
||||
break;
|
||||
|
||||
case "new-conversation":
|
||||
aObject.QueryInterface(Ci.purpleIConversation);
|
||||
this.addConvTab(aObject, aObject.name);
|
||||
break;
|
||||
|
||||
default:
|
||||
throw "Bad notification";
|
||||
}
|
||||
},
|
||||
|
||||
addConvTab: function mo_addConvTab(aConv, aTitle) {
|
||||
if (aConv.id in this.convs)
|
||||
return this.convs[aConv.id];
|
||||
|
||||
var conv = document.createElement("conversation");
|
||||
var panels = document.getElementById("panels");
|
||||
panels.appendChild(conv);
|
||||
|
||||
var tabs = document.getElementById("tabs");
|
||||
var tab = document.createElement("convtab");
|
||||
tab.tooltipText = aTitle;
|
||||
tab.setAttribute("label", aTitle.replace(/@.*/, ""));
|
||||
tabs.appendChild(tab);
|
||||
if (!tabs.selectedItem)
|
||||
tabs.selectedItem = tab;
|
||||
|
||||
conv.conv = aConv;
|
||||
conv.tab = tab;
|
||||
this.convs[aConv.id] = conv;
|
||||
return conv;
|
||||
},
|
||||
|
||||
focusConv: function mo_focusConv(aConv) {
|
||||
var id = aConv.id;
|
||||
if (!(id in this.convs)) {
|
||||
// We only support a single chat window ATM so we can safely
|
||||
// re-add a closed conversation tab
|
||||
this.addConvTab(aConv, aConv.name);
|
||||
if (!(id in this.convs))
|
||||
throw "Can't find the conversation, even after trying to add it again!";
|
||||
}
|
||||
var panels = document.getElementById("panels");
|
||||
var conv = this.convs[id];
|
||||
panels.selectedPanel = conv;
|
||||
document.getElementById("tabs").selectedIndex = panels.selectedIndex;
|
||||
},
|
||||
|
||||
onSelectTab: function mo_onSelectTab() {
|
||||
var tabs = document.getElementById("tabs");
|
||||
var tab = tabs.selectedItem;
|
||||
tab.removeAttribute("unread");
|
||||
tab.removeAttribute("attention");
|
||||
var panels = document.getElementById("panels");
|
||||
panels.selectedPanel.focus();
|
||||
},
|
||||
|
||||
onClickTab: function mo_onClickTab(aEvent) {
|
||||
if (aEvent.button == 1 && aEvent.target.localName == "convtab")
|
||||
this.closeTab(aEvent.target);
|
||||
},
|
||||
|
||||
closeCurrentTab: function mo_closeCurrentTab() {
|
||||
var tabs = document.getElementById("tabs");
|
||||
this.closeTab(tabs.selectedItem);
|
||||
},
|
||||
|
||||
closeTab: function mo_closeTab(aTab) {
|
||||
var tabs = aTab.parentNode.childNodes;
|
||||
var i = aTab.parentNode.getIndexOfItem(aTab);
|
||||
if (i == -1)
|
||||
throw "Can't find the tab that should be closed";
|
||||
|
||||
var panels = document.getElementById("panels");
|
||||
var conv = panels.childNodes[i];
|
||||
if (!conv)
|
||||
throw "Can't find the conversation associated with the tab.";
|
||||
delete this.convs[conv.convId];
|
||||
|
||||
conv.conv.close(); //FIXME We shouldn't need this, why isn't the destructor
|
||||
// of the conversation binding called??
|
||||
|
||||
if (aTab.selected) {
|
||||
if (i) {
|
||||
// we are not on the first tab
|
||||
aTab.parentNode.selectedItem = aTab.previousSibling;
|
||||
panels.selectedPanel = conv.previousSibling;
|
||||
}
|
||||
else {
|
||||
// we remove the first tab, which is selected
|
||||
if (aTab.nextSibling) {
|
||||
// at least a tab remain
|
||||
aTab.parentNode.selectedItem = aTab.nextSibling;
|
||||
panels.selectedPanel = conv.nextSibling;
|
||||
}
|
||||
else {
|
||||
window.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
panels.removeChild(conv);
|
||||
// Workaround an ugly bug: when removing a panel, the selected panel disappears
|
||||
panels.selectedPanel = panels.selectedPanel;
|
||||
|
||||
aTab.parentNode.removeChild(aTab);
|
||||
},
|
||||
|
||||
onPopupShowing: function mo_onPopupShowing(aEvent) {
|
||||
if (aEvent.explicitOriginalTarget.localName == "convtab")
|
||||
this.contextTab = aEvent.explicitOriginalTarget;
|
||||
else
|
||||
aEvent.preventDefault();
|
||||
},
|
||||
|
||||
onCommandClose: function mo_onCommandClose(aEvent) {
|
||||
this.closeTab(this.contextTab);
|
||||
},
|
||||
|
||||
load: function mo_load() {
|
||||
addObservers(msgObserver, events);
|
||||
if (window.pendingNotifications) {
|
||||
let notifications = window.pendingNotifications;
|
||||
for (let i = 0; i < notifications.length; ++i) {
|
||||
let notif = notifications[i];
|
||||
msgObserver.observe(notif.object, notif.topic, notif.msg);
|
||||
}
|
||||
delete window.pendingNotifications;
|
||||
}
|
||||
window.addEventListener("unload", msgObserver.unload, false);
|
||||
},
|
||||
unload: function mo_unload() {
|
||||
removeObservers(msgObserver, events);
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
function setStatus(aMsg)
|
||||
{
|
||||
var status = document.getElementById("status");
|
||||
status.setAttribute("label", aMsg);
|
||||
}
|
||||
*/
|
||||
|
||||
this.addEventListener("load", msgObserver.load, false);
|
|
@ -0,0 +1,81 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- ***** BEGIN LICENSE BLOCK *****
|
||||
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
-
|
||||
- The contents of this file are subject to the Mozilla Public License Version
|
||||
- 1.1 (the "License"); you may not use this file except in compliance with
|
||||
- the License. You may obtain a copy of the License at
|
||||
- http://www.mozilla.org/MPL/
|
||||
-
|
||||
- Software distributed under the License is distributed on an "AS IS" basis,
|
||||
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
- for the specific language governing rights and limitations under the
|
||||
- License.
|
||||
-
|
||||
- The Original Code is the Instantbird messenging client, released
|
||||
- 2007.
|
||||
-
|
||||
- The Initial Developer of the Original Code is
|
||||
- Florian QUEZE <florian@instantbird.org>.
|
||||
- Portions created by the Initial Developer are Copyright (C) 2007
|
||||
- the Initial Developer. All Rights Reserved.
|
||||
-
|
||||
- Contributor(s):
|
||||
-
|
||||
- Alternatively, the contents of this file may be used under the terms of
|
||||
- either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
- in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
- of those above. If you wish to allow use of your version of this file only
|
||||
- under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
- use your version of this file under the terms of the MPL, indicate your
|
||||
- decision by deleting the provisions above and replace them with the notice
|
||||
- and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
- the provisions above, a recipient may use your version of this file under
|
||||
- the terms of any one of the MPL, the GPL or the LGPL.
|
||||
-
|
||||
- ***** END LICENSE BLOCK ***** -->
|
||||
|
||||
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://instantbird/skin/" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://instantbird/content/instantbird.css" type="text/css"?>
|
||||
|
||||
<!DOCTYPE window [
|
||||
<!ENTITY % instantbirdDTD SYSTEM "chrome://instantbird/locale/instantbird.dtd">
|
||||
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
|
||||
%instantbirdDTD;
|
||||
%brandDTD;
|
||||
]>
|
||||
|
||||
<window
|
||||
id = "instantbird"
|
||||
windowtype="Messenger:convs"
|
||||
title = "&convWindow.title;"
|
||||
width = "500"
|
||||
height = "600"
|
||||
persist= "width height screenX screenY"
|
||||
xmlns = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
<script type="application/javascript" src="chrome://instantbird/content/utilities.js"/>
|
||||
<script type="application/javascript" src="chrome://instantbird/content/instantbird.js"/>
|
||||
|
||||
<commandset id="conversationsCommands">
|
||||
<command id="cmd_close" oncommand="msgObserver.closeCurrentTab()"/>
|
||||
</commandset>
|
||||
|
||||
<keyset id="conversationsKeys">
|
||||
<key id="key_close" key="w" modifiers="accel" command="cmd_close"/>
|
||||
</keyset>
|
||||
|
||||
<tabbox flex="1">
|
||||
<tabs id="tabs" context="tabs-context-menu"
|
||||
onselect="msgObserver.onSelectTab();" onclick="msgObserver.onClickTab(event)"/>
|
||||
<tabpanels id="panels" flex="1"/>
|
||||
</tabbox>
|
||||
<menupopup id="tabs-context-menu" onpopupshowing="msgObserver.onPopupShowing(event);">
|
||||
<menuitem label="&conversation.contextMenu.close;" oncommand="msgObserver.onCommandClose(event)"/>
|
||||
</menupopup>
|
||||
|
||||
<statusbar>
|
||||
<statusbarpanel id="status" label="" crop="end" flex="1"/>
|
||||
</statusbar>
|
||||
</window>
|
|
@ -0,0 +1,111 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is the Instantbird messenging client, released
|
||||
* 2007.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Florian QUEZE <florian@instantbird.org>.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2008
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
const autoJoinPref = "autoJoin";
|
||||
|
||||
var joinChat = {
|
||||
onload: function jc_onload() {
|
||||
this.pcs = Components.classes["@instantbird.org/purple/core;1"]
|
||||
.getService(Ci.purpleICoreService);
|
||||
this.buildAccountList();
|
||||
},
|
||||
|
||||
buildAccountList: function jc_buildAccountList() {
|
||||
var accountList = document.getElementById("accountlist");
|
||||
for (let acc in this.getAccounts()) {
|
||||
if (!acc.connected)
|
||||
continue;
|
||||
var proto = acc.protocol;
|
||||
if (proto.id != "prpl-irc")
|
||||
continue;
|
||||
var item = accountList.appendItem(acc.name, acc.id, proto.name);
|
||||
item.setAttribute("image", "chrome://instantbird/skin/prpl/" + proto.id + ".png");
|
||||
item.setAttribute("class", "menuitem-iconic");
|
||||
}
|
||||
if (!accountList.itemCount) {
|
||||
document.getElementById("joinChatDialog").cancelDialog();
|
||||
throw "No connected IRC account!";
|
||||
}
|
||||
accountList.selectedIndex = 0;
|
||||
},
|
||||
|
||||
getValue: function jc_getValue(aId) {
|
||||
var elt = document.getElementById(aId);
|
||||
return elt.value;
|
||||
},
|
||||
|
||||
join: function jc_join() {
|
||||
var account = this.pcs.getAccountById(this.getValue("accountlist"));
|
||||
var name = this.getValue("name")
|
||||
var conv = account.joinChat(name);
|
||||
|
||||
if (document.getElementById("autojoin").checked) {
|
||||
var prefBranch = Components.classes["@mozilla.org/preferences-service;1"]
|
||||
.getService(Ci.nsIPrefService)
|
||||
.getBranch("messenger.account." + account.id + ".");
|
||||
var autojoin = [ ];
|
||||
if (prefBranch.prefHasUserValue(autoJoinPref)) {
|
||||
var prefValue = prefBranch.getCharPref(autoJoinPref);
|
||||
if (prefValue)
|
||||
autojoin = prefValue.split(",");
|
||||
}
|
||||
|
||||
if (autojoin.indexOf(name) == -1) {
|
||||
autojoin.push(name);
|
||||
prefBranch.setCharPref(autoJoinPref, autojoin.join(","));
|
||||
}
|
||||
}
|
||||
|
||||
// if the conversation is being created, |conv| will be null
|
||||
// here. The new-conversation notification should be used to focus
|
||||
// it when done. If it is already opened, we should focus it now.
|
||||
if (!conv)
|
||||
return;
|
||||
|
||||
var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
|
||||
.getService(Components.interfaces.nsIWindowMediator);
|
||||
var convWindow = wm.getMostRecentWindow("Messenger:convs");
|
||||
if (convWindow) {
|
||||
convWindow.msgObserver.focusConv(conv);
|
||||
convWindow.focus();
|
||||
}
|
||||
},
|
||||
|
||||
getAccounts: function jc_getAccounts() {
|
||||
return getIter(this.pcs.getAccounts, Ci.purpleIAccount);
|
||||
}
|
||||
};
|
|
@ -0,0 +1,79 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- ***** BEGIN LICENSE BLOCK *****
|
||||
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
-
|
||||
- The contents of this file are subject to the Mozilla Public License Version
|
||||
- 1.1 (the "License"); you may not use this file except in compliance with
|
||||
- the License. You may obtain a copy of the License at
|
||||
- http://www.mozilla.org/MPL/
|
||||
-
|
||||
- Software distributed under the License is distributed on an "AS IS" basis,
|
||||
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
- for the specific language governing rights and limitations under the
|
||||
- License.
|
||||
-
|
||||
- The Original Code is the Instantbird messenging client, released
|
||||
- 2007.
|
||||
-
|
||||
- The Initial Developer of the Original Code is
|
||||
- Florian QUEZE <florian@instantbird.org>.
|
||||
- Portions created by the Initial Developer are Copyright (C) 2008
|
||||
- the Initial Developer. All Rights Reserved.
|
||||
-
|
||||
- Contributor(s):
|
||||
-
|
||||
- Alternatively, the contents of this file may be used under the terms of
|
||||
- either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
- in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
- of those above. If you wish to allow use of your version of this file only
|
||||
- under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
- use your version of this file under the terms of the MPL, indicate your
|
||||
- decision by deleting the provisions above and replace them with the notice
|
||||
- and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
- the provisions above, a recipient may use your version of this file under
|
||||
- the terms of any one of the MPL, the GPL or the LGPL.
|
||||
-
|
||||
- ***** END LICENSE BLOCK ***** -->
|
||||
|
||||
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://instantbird/skin/account.css" type="text/css"?>
|
||||
|
||||
<!DOCTYPE window SYSTEM "chrome://instantbird/locale/joinChat.dtd">
|
||||
|
||||
<dialog
|
||||
id = "joinChatDialog"
|
||||
title = "&joinChatWindow.title;"
|
||||
buttons= "accept,cancel"
|
||||
width = "300"
|
||||
height = "150"
|
||||
xmlns = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
onload = "joinChat.onload()"
|
||||
ondialogaccept="joinChat.join()">
|
||||
<script type="application/javascript" src="chrome://instantbird/content/utilities.js"/>
|
||||
<script type="application/javascript" src="chrome://instantbird/content/joinchat.js"/>
|
||||
|
||||
<grid>
|
||||
<columns>
|
||||
<column/>
|
||||
<column flex="1"/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row id="nameBox">
|
||||
<label value="&name.label;" control="name"/>
|
||||
<textbox id="name"/>
|
||||
</row>
|
||||
<row id="accountBox">
|
||||
<label value="&account.label;" control="accountlist"/>
|
||||
<menulist id="accountlist"/>
|
||||
</row>
|
||||
<row>
|
||||
<separator class="thin"/>
|
||||
</row>
|
||||
<row id="autojoinBox">
|
||||
<spacer/>
|
||||
<checkbox label="&autojoin.label;" accesskey="&autojoin.accesskey;" id="autojoin"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</dialog>
|
|
@ -0,0 +1,127 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is the Instantbird messenging client, released
|
||||
* 2007.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Florian QUEZE <florian@instantbird.org>.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2007
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
const addonManagerWindow = "chrome://mozapps/content/extensions/extensions.xul?type=extensions";
|
||||
const accountManagerWindow = "chrome://instantbird/content/accounts.xul";
|
||||
const blistWindow = "chrome://instantbird/content/blist.xul";
|
||||
const addBuddyWindow = "chrome://instantbird/content/addbuddy.xul";
|
||||
const joinChatWindow = "chrome://instantbird/content/joinchat.xul";
|
||||
const aboutWindow = "chrome://instantbird/content/aboutDialog.xul";
|
||||
const convWindow = "chrome://instantbird/content/instantbird.xul";
|
||||
|
||||
var menus = {
|
||||
focus: function menu_focus(aWindowType) {
|
||||
var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
|
||||
.getService(Components.interfaces.nsIWindowMediator);
|
||||
var win = wm.getMostRecentWindow(aWindowType);
|
||||
if (win)
|
||||
win.focus();
|
||||
return win;
|
||||
},
|
||||
|
||||
about: function menu_about() {
|
||||
if (!this.focus("Messenger:About"))
|
||||
window.open(aboutWindow, "About",
|
||||
"chrome,resizable=no,minimizable=no,centerscreen");
|
||||
},
|
||||
|
||||
accounts: function menu_accounts() {
|
||||
if (!this.focus("Messenger:Accounts"))
|
||||
window.open(accountManagerWindow, "Accounts",
|
||||
"chrome,resizable");
|
||||
},
|
||||
|
||||
addons: function menu_addons() {
|
||||
if (!this.focus("Extension:Manager"))
|
||||
window.open(addonManagerWindow, "Addons",
|
||||
"chrome,menubar,extra-chrome,toolbar,dialog=no,resizable");
|
||||
},
|
||||
|
||||
addBuddy: function menu_addBuddy() {
|
||||
window.openDialog(addBuddyWindow, "",
|
||||
"chrome,modal,titlebar,centerscreen");
|
||||
},
|
||||
|
||||
joinChat: function menu_joinChat() {
|
||||
window.openDialog(joinChatWindow, "",
|
||||
"chrome,modal,titlebar,centerscreen");
|
||||
},
|
||||
|
||||
getAway: function menu_getAway() {
|
||||
buddyList.getAway();
|
||||
},
|
||||
|
||||
toggleSounds: function menu_toggleSounds() {
|
||||
var checked = document.getElementById("soundsMenuItem")
|
||||
.getAttribute("checked") == "true";
|
||||
this._prefBranch.setBoolPref(soundsPref, checked);
|
||||
},
|
||||
|
||||
uninit: function menu_uninit() {
|
||||
menus._prefBranch.removeObserver(soundsPref, menus);
|
||||
},
|
||||
|
||||
init: function menu_init() {
|
||||
var branch = Components.classes["@mozilla.org/preferences-service;1"]
|
||||
.getService(Ci.nsIPrefService)
|
||||
.getBranch(optPrefBranch);
|
||||
branch.QueryInterface(Ci.nsIPrefBranch2);
|
||||
menus._prefBranch = branch;
|
||||
|
||||
branch.addObserver(soundsPref, menus, false);
|
||||
var menuitem = document.getElementById("soundsMenuItem");
|
||||
if (branch.getBoolPref(soundsPref))
|
||||
menuitem.setAttribute("checked", "true");
|
||||
else
|
||||
menuitem.removeAttribute("checked");
|
||||
|
||||
this.addEventListener("unload", menus.uninit, false);
|
||||
},
|
||||
|
||||
observe: function menu_observe(aSubject, aTopic, aData) {
|
||||
if (aTopic != "nsPref:changed" || aData != soundsPref)
|
||||
return;
|
||||
|
||||
var menuitem = document.getElementById("soundsMenuItem");
|
||||
if (this._prefBranch.getBoolPref(soundsPref))
|
||||
menuitem.setAttribute("checked", "true");
|
||||
else
|
||||
menuitem.removeAttribute("checked");
|
||||
}
|
||||
};
|
||||
|
||||
this.addEventListener("load", menus.init, false);
|
|
@ -0,0 +1,151 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is the Instantbird messenging client, released
|
||||
* 2007.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Florian QUEZE <florian@instantbird.org>.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2007
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
const optPrefBranch = "messenger.options.";
|
||||
const soundsPref = "playSounds";
|
||||
|
||||
var soundHelper = {
|
||||
soundFiles: {
|
||||
incoming: "chrome://instantbird/skin/sounds/receive.wav",
|
||||
outgoing: "chrome://instantbird/skin/sounds/send.wav",
|
||||
login: "chrome://instantbird/skin/sounds/login.wav",
|
||||
logout: "chrome://instantbird/skin/sounds/logout.wav",
|
||||
alert: "chrome://instantbird/skin/sounds/alert.wav"
|
||||
},
|
||||
_soundUri: { },
|
||||
_playingEvents: [ ],
|
||||
|
||||
_muted: false,
|
||||
get muted() {
|
||||
return this._muted;
|
||||
},
|
||||
set muted(val) {
|
||||
this._muted = val;
|
||||
if (val)
|
||||
this._playingEvents = [ ];
|
||||
},
|
||||
|
||||
get _sound() {
|
||||
var sound = Components.classes["@mozilla.org/sound;1"]
|
||||
.createInstance(Ci.nsISound);
|
||||
sound.init();
|
||||
|
||||
delete this._sound;
|
||||
return (this._sound = sound);
|
||||
},
|
||||
|
||||
_play: function sh__play() {
|
||||
if (this._muted)
|
||||
return;
|
||||
|
||||
var uri = soundHelper._soundUri[soundHelper._playingEvents[0]];
|
||||
soundHelper._sound.play(uri);
|
||||
soundHelper._playingEvents.shift();
|
||||
if (soundHelper._playingEvents.length)
|
||||
setTimeout(soundHelper._play, 0);
|
||||
},
|
||||
|
||||
play: function sh_play(aEvent) {
|
||||
if (this._muted)
|
||||
return;
|
||||
|
||||
if (!(aEvent in this._soundUri)) {
|
||||
if (!(aEvent in this.soundFiles))
|
||||
throw "bad sound event";
|
||||
this._soundUri[aEvent] = makeURI(this.soundFiles[aEvent]);
|
||||
}
|
||||
|
||||
if (this._playingEvents.indexOf(aEvent) == -1)
|
||||
if (this._playingEvents.push(aEvent) == 1)
|
||||
setTimeout(this._play, 0);
|
||||
}
|
||||
};
|
||||
|
||||
const soundEvents = ["buddy-signed-on",
|
||||
"buddy-signed-off",
|
||||
"new-text"];
|
||||
|
||||
var soundObserver = {
|
||||
observe: function so_observe(aObject, aTopic, aMsg) {
|
||||
switch(aTopic) {
|
||||
case "buddy-signed-on":
|
||||
soundHelper.play("login");
|
||||
break;
|
||||
|
||||
case "buddy-signed-off":
|
||||
soundHelper.play("logout");
|
||||
break;
|
||||
|
||||
case "new-text":
|
||||
aObject.QueryInterface(Ci.purpleIMessage);
|
||||
if (aObject.incoming && !aObject.system) {
|
||||
if (!aObject.conversation.isChat || aObject.containsNick)
|
||||
soundHelper.play("incoming");
|
||||
}
|
||||
else
|
||||
if (aObject.outgoing)
|
||||
soundHelper.play("outgoing");
|
||||
break;
|
||||
|
||||
case "nsPref:changed":
|
||||
if (aMsg == soundsPref)
|
||||
soundHelper.muted = !this._prefBranch.getBoolPref(soundsPref);
|
||||
break;
|
||||
|
||||
default:
|
||||
throw "bad notification";
|
||||
}
|
||||
},
|
||||
load: function so_load() {
|
||||
addObservers(soundObserver, soundEvents);
|
||||
soundObserver._prefBranch =
|
||||
Components.classes["@mozilla.org/preferences-service;1"]
|
||||
.getService(Ci.nsIPrefService)
|
||||
.getBranch(optPrefBranch);
|
||||
soundObserver._prefBranch.QueryInterface(Ci.nsIPrefBranch2);
|
||||
soundObserver._prefBranch.addObserver(soundsPref, soundObserver, false);
|
||||
soundHelper.muted = !soundObserver._prefBranch.getBoolPref(soundsPref);
|
||||
|
||||
this.addEventListener("unload", soundObserver.unload, false);
|
||||
},
|
||||
unload: function so_unload() {
|
||||
removeObservers(soundObserver, soundEvents);
|
||||
soundObserver._prefBranch.removeObserver(soundsPref, soundObserver);
|
||||
}
|
||||
};
|
||||
|
||||
this.addEventListener("load", soundObserver.load, false);
|
|
@ -0,0 +1,89 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is the Instantbird messenging client, released
|
||||
* 2007.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Florian QUEZE <florian@instantbird.org>.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2007
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
const Cc = Components.classes;
|
||||
const Ci = Components.interfaces;
|
||||
|
||||
function getIter(aGetEnumFct, aIface)
|
||||
{
|
||||
var enumerator = aGetEnumFct();
|
||||
while (enumerator.hasMoreElements()) {
|
||||
let item = enumerator.getNext();
|
||||
yield item.QueryInterface(aIface);
|
||||
}
|
||||
}
|
||||
|
||||
function getObserverService()
|
||||
{
|
||||
return Cc["@mozilla.org/observer-service;1"].getService(Ci.nsIObserverService);
|
||||
}
|
||||
|
||||
function addObservers(aObserver, aTopics)
|
||||
{
|
||||
var observerService = getObserverService();
|
||||
for (let i = 0; i < aTopics.length; ++i)
|
||||
observerService.addObserver(aObserver, aTopics[i], false);
|
||||
}
|
||||
|
||||
function removeObservers(aObserver, aTopics)
|
||||
{
|
||||
var observerService = getObserverService();
|
||||
for (let i = 0; i < aTopics.length; ++i)
|
||||
observerService.removeObserver(aObserver, aTopics[i]);
|
||||
}
|
||||
|
||||
function makeURI(aURL, aOriginCharset, aBaseURI)
|
||||
{
|
||||
var ioService = Components.classes["@mozilla.org/network/io-service;1"]
|
||||
.getService(Ci.nsIIOService);
|
||||
return ioService.newURI(aURL, aOriginCharset, aBaseURI);
|
||||
}
|
||||
|
||||
function logMsg(aString)
|
||||
{
|
||||
Components.classes["@mozilla.org/consoleservice;1"]
|
||||
.getService(Ci.nsIConsoleService)
|
||||
.logStringMessage(aString);
|
||||
}
|
||||
|
||||
function setText(aElt, aTxt)
|
||||
{
|
||||
if (aElt.hasChildNodes())
|
||||
aElt.removeChild(aElt.firstChild);
|
||||
var textNode = document.createTextNode(aTxt);
|
||||
aElt.appendChild(textNode);
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
instantbird.jar:
|
||||
% content branding %content/branding/ xpcnativewrappers=yes
|
||||
content/branding/about-credits.png (branding/about-credits.png)
|
||||
content/branding/about-footer.png (branding/about-footer.png)
|
||||
content/branding/about-logo.png (branding/about-logo.png)
|
||||
content/branding/icon64.png (branding/icon64.png)
|
||||
% content instantbird %content/instantbird/ xpcnativewrappers=yes
|
||||
content/instantbird/aboutDialog.css (instantbird/aboutDialog.css)
|
||||
content/instantbird/aboutDialog.xul (instantbird/aboutDialog.xul)
|
||||
content/instantbird/account.js (instantbird/account.js)
|
||||
content/instantbird/accounts.css (instantbird/accounts.css)
|
||||
content/instantbird/accounts.js (instantbird/accounts.js)
|
||||
content/instantbird/accounts.xul (instantbird/accounts.xul)
|
||||
content/instantbird/accountWizard.js (instantbird/accountWizard.js)
|
||||
content/instantbird/accountWizard.xul (instantbird/accountWizard.xul)
|
||||
content/instantbird/account.xml (instantbird/account.xml)
|
||||
content/instantbird/account.xul (instantbird/account.xul)
|
||||
content/instantbird/addbuddy.js (instantbird/addbuddy.js)
|
||||
content/instantbird/addbuddy.xul (instantbird/addbuddy.xul)
|
||||
content/instantbird/anim.xml (instantbird/anim.xml)
|
||||
content/instantbird/blist.css (instantbird/blist.css)
|
||||
content/instantbird/blist.js (instantbird/blist.js)
|
||||
content/instantbird/blist.xul (instantbird/blist.xul)
|
||||
content/instantbird/buddy.xml (instantbird/buddy.xml)
|
||||
content/instantbird/conversation.xml (instantbird/conversation.xml)
|
||||
content/instantbird/conv.html (instantbird/conv.html)
|
||||
content/instantbird/credits.xhtml (instantbird/credits.xhtml)
|
||||
content/instantbird/group.xml (instantbird/group.xml)
|
||||
content/instantbird/instantbird.css (instantbird/instantbird.css)
|
||||
content/instantbird/instantbird.js (instantbird/instantbird.js)
|
||||
content/instantbird/instantbird.xul (instantbird/instantbird.xul)
|
||||
content/instantbird/joinchat.js (instantbird/joinchat.js)
|
||||
content/instantbird/joinchat.xul (instantbird/joinchat.xul)
|
||||
content/instantbird/menus.js (instantbird/menus.js)
|
||||
content/instantbird/sound.js (instantbird/sound.js)
|
||||
content/instantbird/utilities.js (instantbird/utilities.js)
|
||||
|
||||
#ifdef DEBUG
|
||||
debug.jar:
|
||||
% content debug %content/debug/ xpcnativewrappers=yes
|
||||
% overlay chrome://instantbird/content/blist.xul chrome://debug/content/debug.xul
|
||||
content/debug/debug.js (debug/debug.js)
|
||||
content/debug/debug.xul (debug/debug.xul)
|
||||
#endif
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
ifndef LIBXUL_SDK
|
||||
include $(topsrcdir)/toolkit/toolkit-tiers.mk
|
||||
endif
|
||||
|
||||
TIERS += app
|
||||
|
||||
tier_app_dirs += \
|
||||
purple \
|
||||
instantbird \
|
||||
$(NULL)
|
||||
|
||||
|
||||
installer:
|
||||
@$(MAKE) -C instantbird/installer installer
|
||||
|
||||
package:
|
||||
@$(MAKE) -C instantbird/installer
|
||||
|
||||
install::
|
||||
@$(MAKE) -C instantbird/installer install
|
|
@ -0,0 +1,2 @@
|
|||
0.1.2pre
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
MOZ_APP_NAME=instantbird
|
||||
MOZ_APP_DISPLAYNAME=Instantbird
|
||||
MOZ_APP_VERSION=0.1.2pre
|
||||
MOZ_XUL_APP=1
|
||||
MOZ_ENABLE_LIBXUL=1
|
||||
MOZ_XULRUNNER=1
|
||||
MOZ_NO_XPCOM_OBSOLETE=1
|
||||
MOZ_UPDATER=1
|
||||
MOZ_PLACES=
|
|
@ -0,0 +1,126 @@
|
|||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Mozilla Browser code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# IBM Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2004
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Brian Ryner <bryner@brianryner.com>
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
DEPTH = ../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
NO_PKG_FILES = \
|
||||
TestGtkEmbed \
|
||||
bloaturls.txt \
|
||||
codesighs* \
|
||||
elf-dynstr-gc \
|
||||
instantbird-bin.elf \
|
||||
instantbird-config \
|
||||
mangle* \
|
||||
maptsv* \
|
||||
mfc* \
|
||||
mkdepend* \
|
||||
msdump* \
|
||||
msmap* \
|
||||
nm2tsv* \
|
||||
nsinstall* \
|
||||
regxpcom* \
|
||||
res/samples \
|
||||
res/throbber \
|
||||
shlibsign* \
|
||||
winEmbed.exe \
|
||||
xpcshell* \
|
||||
xpidl* \
|
||||
xpt_dump* \
|
||||
xpt_link* \
|
||||
dirver* \
|
||||
plugins \
|
||||
res/arrow.gif \
|
||||
res/arrowd.gif \
|
||||
res/bloatcycle.html \
|
||||
res/html \
|
||||
res/loading-image.gif \
|
||||
res/rdf \
|
||||
res/viewer.properties \
|
||||
res/viewsource.css \
|
||||
chrome/chromelist.txt \
|
||||
chrome/embed-sample.jar \
|
||||
PalmSyncInstall.exe \
|
||||
components/libgkplugin.so \
|
||||
components/gkplugin.dll \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
MOZ_PKG_REMOVALS = $(srcdir)/removed-files.in
|
||||
|
||||
ifneq (,$(BUILD_STATIC_LIBS)$(MOZ_ENABLE_LIBXUL))
|
||||
ifeq (WINNT,$(OS_ARCH))
|
||||
MOZ_PKG_MANIFEST_P = $(srcdir)/windows/packages-static
|
||||
endif
|
||||
else
|
||||
$(error you need a "--enable-static or --enable-libxul" build to create an installer)
|
||||
endif
|
||||
|
||||
MOZ_NONLOCALIZED_PKG_LIST = \
|
||||
xpcom \
|
||||
instantbird \
|
||||
$(NULL)
|
||||
|
||||
MOZ_LOCALIZED_PKG_LIST = $(AB_CD)
|
||||
|
||||
DEFINES += -DAB_CD=$(AB_CD)
|
||||
|
||||
ifdef MOZ_PKG_MANIFEST_P
|
||||
MOZ_PKG_MANIFEST = packages-static
|
||||
|
||||
$(MOZ_PKG_MANIFEST): $(MOZ_PKG_MANIFEST_P)
|
||||
$(PERL) $(topsrcdir)/config/preprocessor.pl $(DEFINES) $(ACDEFINES) $< > $@
|
||||
endif
|
||||
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
MOZ_PKG_MAC_DSSTORE=branding/dsstore
|
||||
MOZ_PKG_MAC_BACKGROUND=branding/background.png
|
||||
MOZ_PKG_MAC_ICON=branding/disk.icns
|
||||
#MOZ_PKG_MAC_RSRC=branding/license.r
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/toolkit/mozapps/installer/packager.mk
|
||||
|
||||
installer: removed-files
|
||||
ifdef INSTALLER_DIR
|
||||
$(MAKE) -C $(INSTALLER_DIR)
|
||||
endif
|
|
@ -0,0 +1,306 @@
|
|||
components/xpti.dat
|
||||
components/compreg.dat
|
||||
components/accessibility.dll
|
||||
components/appcomps.dll
|
||||
components/appshell.dll
|
||||
components/caps.dll
|
||||
components/chrome.dll
|
||||
components/composer.dll
|
||||
components/docshell.dll
|
||||
components/editor.dll
|
||||
components/embedcomponents.dll
|
||||
components/gkgfxwin.dll
|
||||
components/gklayout.dll
|
||||
components/gkparser.dll
|
||||
components/gkwidget.dll
|
||||
components/i18n.dll
|
||||
components/imgicon.dll
|
||||
components/imglib2.dll
|
||||
components/import.dll
|
||||
components/mail.dll
|
||||
components/mork.dll
|
||||
components/mozfind.dll
|
||||
components/mozldap.dll
|
||||
components/msgMapi.dll
|
||||
components/msgsmime.dll
|
||||
components/myspell.dll
|
||||
components/necko.dll
|
||||
components/necko2.dll
|
||||
components/nsprefm.dll
|
||||
components/pipboot.dll
|
||||
components/pipnss.dll
|
||||
components/pippki.dll
|
||||
components/profile.dll
|
||||
components/profilemigration.dll
|
||||
components/rdf.dll
|
||||
components/spellchk.dll
|
||||
components/txmgr.dll
|
||||
components/uconv.dll
|
||||
components/wallet.dll
|
||||
components/webbrwsr.dll
|
||||
components/wlltvwrs.dll
|
||||
components/xmlextras.dll
|
||||
components/xpc3250.dll
|
||||
components/xppref32.dll
|
||||
nsldap32v50.dll
|
||||
nsldappr32v50.dll
|
||||
#ifdef XP_WIN
|
||||
components/accessibility-msaa.xpt
|
||||
components/accessibility.xpt
|
||||
components/addrbook.xpt
|
||||
components/alerts.xpt
|
||||
components/appshell.xpt
|
||||
components/caps.xpt
|
||||
components/chardet.xpt
|
||||
components/commandhandler.xpt
|
||||
components/composer.xpt
|
||||
components/content_base.xpt
|
||||
components/content_html.xpt
|
||||
components/content_htmldoc.xpt
|
||||
components/content_xmldoc.xpt
|
||||
components/content_xslt.xpt
|
||||
components/crashreporter.xpt
|
||||
components/docshell_base.xpt
|
||||
components/dom.xpt
|
||||
components/dom_base.xpt
|
||||
components/dom_core.xpt
|
||||
components/dom_css.xpt
|
||||
components/dom_events.xpt
|
||||
components/dom_html.xpt
|
||||
components/dom_offline.xpt
|
||||
components/dom_range.xpt
|
||||
components/dom_stylesheets.xpt
|
||||
components/dom_traversal.xpt
|
||||
components/dom_views.xpt
|
||||
components/dom_xbl.xpt
|
||||
components/dom_xpath.xpt
|
||||
components/dom_xul.xpt
|
||||
components/downloadmanager.xpt
|
||||
components/editor.xpt
|
||||
components/embed_base.xpt
|
||||
components/exthandler.xpt
|
||||
components/find.xpt
|
||||
components/gfx.xpt
|
||||
components/helperAppDlg.xpt
|
||||
components/htmlparser.xpt
|
||||
components/imgicon.xpt
|
||||
components/imglib2.xpt
|
||||
components/impComm4xMail.xpt
|
||||
components/import.xpt
|
||||
components/intl.xpt
|
||||
components/jar.xpt
|
||||
components/jsdservice.xpt
|
||||
components/jsurl.xpt
|
||||
components/layout_base.xpt
|
||||
components/layout_printing.xpt
|
||||
components/layout_xul.xpt
|
||||
components/layout_xul_tree.xpt
|
||||
components/locale.xpt
|
||||
components/lwbrk.xpt
|
||||
components/mailnews.xpt
|
||||
components/mailview.xpt
|
||||
components/mapihook.xpt
|
||||
components/mime.xpt
|
||||
components/mimetype.xpt
|
||||
components/mozbrwsr.xpt
|
||||
components/mozfind.xpt
|
||||
components/mozldap.xpt
|
||||
components/msgbase.xpt
|
||||
components/msgcompo.xpt
|
||||
components/msgdb.xpt
|
||||
components/msgimap.xpt
|
||||
components/msglocal.xpt
|
||||
components/msgnews.xpt
|
||||
components/msgsearch.xpt
|
||||
components/msgsmime.xpt
|
||||
components/necko.xpt
|
||||
components/necko_cache.xpt
|
||||
components/necko_cookie.xpt
|
||||
components/necko_data.xpt
|
||||
components/necko_dns.xpt
|
||||
components/necko_file.xpt
|
||||
components/necko_http.xpt
|
||||
components/necko_jar.xpt
|
||||
components/necko_res.xpt
|
||||
components/necko_strconv.xpt
|
||||
components/pipboot.xpt
|
||||
components/pipnss.xpt
|
||||
components/pippki.xpt
|
||||
components/pref.xpt
|
||||
components/prefmigr.xpt
|
||||
components/profile.xpt
|
||||
components/progressDlg.xpt
|
||||
components/proxyObject.xpt
|
||||
components/rdf.xpt
|
||||
components/signonviewer.xpt
|
||||
components/spellchecker.xpt
|
||||
components/txmgr.xpt
|
||||
components/txtsvc.xpt
|
||||
components/uconv.xpt
|
||||
components/unicharutil.xpt
|
||||
components/uriloader.xpt
|
||||
components/wallet.xpt
|
||||
components/webbrowserpersist.xpt
|
||||
components/webBrowser_core.xpt
|
||||
components/webshell_idls.xpt
|
||||
components/widget.xpt
|
||||
components/windowds.xpt
|
||||
components/windowwatcher.xpt
|
||||
components/winhooks.xpt
|
||||
components/xmlextras.xpt
|
||||
components/xpcom_base.xpt
|
||||
components/xpcom_components.xpt
|
||||
components/xpcom_ds.xpt
|
||||
components/xpcom_io.xpt
|
||||
components/xpcom_obsolete.xpt
|
||||
components/xpcom_thread.xpt
|
||||
components/xpcom_xpti.xpt
|
||||
components/xpcom.xpt
|
||||
components/xpconnect.xpt
|
||||
components/xpinstall.xpt
|
||||
components/xuldoc.xpt
|
||||
components/xultmpl.xpt
|
||||
components/downloadmanager.xpt
|
||||
#endif
|
||||
components/nsUnsetDefaultMail.js
|
||||
components/nsBackgroundUpdateService.js
|
||||
components/nsCloseAllWindows.js
|
||||
components/nsDownloadProgressListener.js
|
||||
components/xptitemp.dat
|
||||
component.reg
|
||||
chrome/installed-chrome.txt
|
||||
chrome/chrome.rdf
|
||||
chrome/app-chrome.manifest
|
||||
chrome/mail.jar
|
||||
chrome/qute.jar
|
||||
chrome/offline.jar
|
||||
chrome/offline.manifest
|
||||
chrome/en-US-mail.jar
|
||||
chrome/overlayinfo/
|
||||
defaults/pref/all.js
|
||||
defaults/pref/security-prefs.js
|
||||
defaults/pref/winpref.js
|
||||
defaults/pref/xpinstall.js
|
||||
defaults/pref/thunderbird.js
|
||||
defaults/profile/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/install.rdf
|
||||
defaults/profile/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/
|
||||
defaults/profile/extensions/Extensions.rdf
|
||||
defaults/profile/extensions/installed-extensions.txt
|
||||
defaults/profile/extensions/
|
||||
defaults/messenger/SpamAssassin.sfd
|
||||
defaults/messenger/SpamPal.sfd
|
||||
defaults/isp/rss.rdf
|
||||
defaults/isp/movemail.rdf
|
||||
defaults/isp/dotmac.rdf
|
||||
defaults/isp/en-US/rss.rdf
|
||||
defaults/isp/en-US/movemail.rdf
|
||||
defaults/isp/en-US/dotmac.rdf
|
||||
defaults/isp/en-US/
|
||||
defaults/isp/
|
||||
isp/gmail.rdf
|
||||
|
||||
components/@DLL_PREFIX@xpcom_compat_c@DLL_SUFFIX@
|
||||
@DLL_PREFIX@xpcom_compat@DLL_SUFFIX@
|
||||
@DLL_PREFIX@zlib@DLL_SUFFIX@
|
||||
@DLL_PREFIX@xpistub@DLL_SUFFIX@
|
||||
#Remove Talkback files from old location (in case user updates from 1.0.x)
|
||||
components/BrandRes.dll
|
||||
components/fullsoft.dll
|
||||
components/master.ini
|
||||
components/qfaservices.dll
|
||||
components/qfaservices.xpt
|
||||
components/talkback-l10n.ini
|
||||
components/talkback.cnt
|
||||
components/talkback.exe
|
||||
components/talkback.hlp
|
||||
components/libqfaservices.so
|
||||
components/talkback/master.ini
|
||||
components/talkback/talkback
|
||||
components/talkback/talkback.so
|
||||
components/talkback/XTalkback.ad
|
||||
HSAPI.dll
|
||||
CondMgr.dll
|
||||
mozABConduit.dll
|
||||
components/palmsync.dll
|
||||
components/palmSync.xpt
|
||||
uninstall/UninstallThunderbird.exe
|
||||
uninstall/uninst.exe
|
||||
uninstall/uninstall.exe
|
||||
components/myspell/en-US.dic
|
||||
components/myspell/en-US.aff
|
||||
regxpcom.exe
|
||||
components/xmlextras.xpt
|
||||
res/cmessage.txt
|
||||
res/html/gopher-audio.gif
|
||||
res/html/gopher-binary.gif
|
||||
res/html/gopher-find.gif
|
||||
res/html/gopher-image.gif
|
||||
res/html/gopher-menu.gif
|
||||
res/html/gopher-movie.gif
|
||||
res/html/gopher-sound.gif
|
||||
res/html/gopher-telnet.gif
|
||||
res/html/gopher-text.gif
|
||||
res/html/gopher-unknown.gif
|
||||
extensions/talkback@mozilla.org/
|
||||
extensions/talkback@mozilla.org/install.rdf
|
||||
extensions/talkback@mozilla.org/chrome.manifest
|
||||
extensions/talkback@mozilla.org/components/qfaservices.xpt
|
||||
extensions/talkback@mozilla.org/components/@DLL_PREFIX@qfaservices@DLL_SUFFIX@
|
||||
#ifdef XP_WIN
|
||||
extensions/talkback@mozilla.org/components/BrandRes.dll
|
||||
extensions/talkback@mozilla.org/components/fullsoft.dll
|
||||
extensions/talkback@mozilla.org/components/master.ini
|
||||
extensions/talkback@mozilla.org/components/talkback-l10n.ini
|
||||
extensions/talkback@mozilla.org/components/talkback.cnt
|
||||
extensions/talkback@mozilla.org/components/talkback.exe
|
||||
extensions/talkback@mozilla.org/components/talkback.hlp
|
||||
extensions/talkback@mozilla.org/InstallDisabled
|
||||
#else
|
||||
#ifdef XP_MACOSX
|
||||
extensions/talkback@mozilla.org/components/talkback/master.ini
|
||||
extensions/talkback@mozilla.org/components/talkback/talkback@DLL_SUFFIX@
|
||||
extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Info.plist
|
||||
extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/MacOS/Talkback
|
||||
extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/pbdevelopment.plist
|
||||
extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/PkgInfo
|
||||
extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/delete.tiff
|
||||
extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/disable.tiff
|
||||
extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/enable.tiff
|
||||
extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/English.lproj/ArchivingSettings.nib/classes.nib
|
||||
extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/English.lproj/ArchivingSettings.nib/info.nib
|
||||
extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/English.lproj/ArchivingSettings.nib/objects.nib
|
||||
extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/English.lproj/InfoPlist.strings
|
||||
extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/English.lproj/IntroWizard.nib/classes.nib
|
||||
extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/English.lproj/IntroWizard.nib/info.nib
|
||||
extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/English.lproj/IntroWizard.nib/objects.nib
|
||||
extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/English.lproj/Localizable.strings
|
||||
extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/English.lproj/MainMenu.nib/classes.nib
|
||||
extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/English.lproj/MainMenu.nib/info.nib
|
||||
extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/English.lproj/MainMenu.nib/objects.nib
|
||||
extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/English.lproj/ProxySettings.nib/classes.nib
|
||||
extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/English.lproj/ProxySettings.nib/info.nib
|
||||
extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/English.lproj/ProxySettings.nib/objects.nib
|
||||
extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/English.lproj/SendingSettings.nib/classes.nib
|
||||
extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/English.lproj/SendingSettings.nib/info.nib
|
||||
extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/English.lproj/SendingSettings.nib/objects.nib
|
||||
extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/KeyInfoKeys.plist
|
||||
extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/KeyInfoSections.plist
|
||||
extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/send.tiff
|
||||
extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/sort_ascending.tiff
|
||||
extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/sort_descending.tiff
|
||||
extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/Talkback.icns
|
||||
#else
|
||||
extensions/talkback@mozilla.org/components/talkback/talkback
|
||||
extensions/talkback@mozilla.org/components/talkback/XTalkback.ad
|
||||
extensions/talkback@mozilla.org/components/master.ini
|
||||
extensions/talkback@mozilla.org/components/talkback.so
|
||||
#endif
|
||||
#endif
|
||||
components/airbag.xpt
|
||||
components/nsUrlClassifierTable.js
|
||||
components/nsScriptableIO.js
|
||||
#ifdef XP_WIN
|
||||
xpicleanup.exe
|
||||
#else
|
||||
xpicleanup
|
||||
#endif
|
|
@ -0,0 +1,128 @@
|
|||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Mozilla Browser code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# IBM Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2004
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Brian Ryner <bryner@brianryner.com>
|
||||
# Chase Phillips <cmp@mozilla.org>
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
DEPTH = ../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
include $(topsrcdir)/toolkit/mozapps/installer/package-name.mk
|
||||
|
||||
CONFIG_DIR = instgen
|
||||
SFX_MODULE = $(topsrcdir)/other-licenses/7zstub/thunderbird/7zSD.sfx
|
||||
|
||||
PP_LOCALIZED_FILES = \
|
||||
packages-static \
|
||||
$(NULL)
|
||||
|
||||
INSTALLER_FILES = \
|
||||
app.tag \
|
||||
nsis/installer.nsi \
|
||||
nsis/uninstaller.nsi \
|
||||
nsis/shared.nsh \
|
||||
$(NULL)
|
||||
|
||||
BRANDING_FILES = \
|
||||
branding.nsi \
|
||||
wizHeader.bmp \
|
||||
wizHeaderRTL.bmp \
|
||||
wizWatermark.bmp \
|
||||
$(NULL)
|
||||
|
||||
DEFINES += \
|
||||
-DAB_CD=$(AB_CD) \
|
||||
-DPKG_BASENAME=$(PKG_BASENAME) \
|
||||
-DMOZ_APP_VERSION=$(MOZ_APP_VERSION) \
|
||||
-DMOZ_APP_DISPLAYNAME=${MOZ_APP_DISPLAYNAME} \
|
||||
-DMOZILLA_VERSION=${MOZILLA_VERSION} \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/config.mk
|
||||
include $(call EXPAND_LOCALE_SRCDIR,toolkit/locales)/installer/windows/charset.mk
|
||||
|
||||
installer::
|
||||
$(MAKE) -C .. installer-stage
|
||||
$(MAKE) $(CONFIG_DIR)/setup.exe
|
||||
|
||||
# For building the uninstaller during the application build so it can be
|
||||
# included for mar file generation.
|
||||
uninstaller::
|
||||
$(RM) -rf $(CONFIG_DIR) && mkdir $(CONFIG_DIR)
|
||||
$(INSTALL) $(addprefix $(srcdir)/,$(INSTALLER_FILES)) $(CONFIG_DIR)
|
||||
$(INSTALL) $(addprefix $(DIST)/branding/,$(BRANDING_FILES)) $(CONFIG_DIR)
|
||||
$(EXIT_ON_ERROR) \
|
||||
for i in $(PP_LOCALIZED_FILES); do \
|
||||
$(PERL) $(topsrcdir)/config/preprocessor.pl $(DEFINES) $(ACDEFINES) $(srcdir)/$$i > $(CONFIG_DIR)/$$i; \
|
||||
done
|
||||
$(PERL) $(topsrcdir)/config/preprocessor.pl -Fsubstitution $(DEFINES) $(ACDEFINES) \
|
||||
$(srcdir)/nsis/defines.nsi.in > $(CONFIG_DIR)/defines.nsi
|
||||
$(PERL) $(topsrcdir)/toolkit/mozapps/installer/windows/nsis/preprocess-locale.pl \
|
||||
$(topsrcdir) $(call EXPAND_LOCALE_SRCDIR,mail/locales)/installer $(AB_CD) \
|
||||
$(WIN_INSTALLER_CHARSET) $(CONFIG_DIR)
|
||||
|
||||
$(CONFIG_DIR)/setup.exe::
|
||||
$(RM) -rf $(CONFIG_DIR) && mkdir $(CONFIG_DIR)
|
||||
$(INSTALL) $(addprefix $(srcdir)/,$(INSTALLER_FILES)) $(CONFIG_DIR)
|
||||
$(INSTALL) $(addprefix $(DIST)/branding/,$(BRANDING_FILES)) $(CONFIG_DIR)
|
||||
cp $(topsrcdir)/mail/EULA.rtf $(CONFIG_DIR)/license.rtf
|
||||
$(EXIT_ON_ERROR) \
|
||||
for i in $(PP_LOCALIZED_FILES); do \
|
||||
$(PERL) $(topsrcdir)/config/preprocessor.pl $(DEFINES) $(ACDEFINES) $(srcdir)/$$i > $(CONFIG_DIR)/$$i; \
|
||||
done
|
||||
$(PERL) $(topsrcdir)/toolkit/mozapps/installer/windows/nsis/make-installremoves.pl \
|
||||
../removed-files > $(CONFIG_DIR)/removed-files.log
|
||||
$(PERL) $(topsrcdir)/config/preprocessor.pl -Fsubstitution $(DEFINES) $(ACDEFINES) \
|
||||
$(srcdir)/nsis/defines.nsi.in > $(CONFIG_DIR)/defines.nsi
|
||||
$(PERL) $(topsrcdir)/toolkit/mozapps/installer/windows/nsis/preprocess-locale.pl \
|
||||
$(topsrcdir) $(call EXPAND_LOCALE_SRCDIR,mail/locales)/installer $(AB_CD) \
|
||||
$(WIN_INSTALLER_CHARSET) $(CONFIG_DIR)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
include $(topsrcdir)/toolkit/mozapps/installer/windows/nsis/makensis.mk
|
||||
|
||||
export::
|
||||
ifndef MOZ_BRANDING_DIRECTORY
|
||||
$(NSINSTALL) -D $(DIST)/branding
|
||||
cp $(srcdir)/nsis/branding.nsi $(DIST)/branding/branding.nsi
|
||||
cp $(srcdir)/wizHeader.bmp $(DIST)/branding/wizHeader.bmp
|
||||
cp $(srcdir)/wizHeaderRTL.bmp $(DIST)/branding/wizHeaderRTL.bmp
|
||||
cp $(srcdir)/wizWatermark.bmp $(DIST)/branding/wizWatermark.bmp
|
||||
endif
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
;!@Install@!UTF-8!
|
||||
Title="Instantbird"
|
||||
RunProgram="setup.exe"
|
||||
;!@InstallEnd@!
|
|
@ -0,0 +1,47 @@
|
|||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Mozilla Installer code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Mozilla Foundation
|
||||
# Portions created by the Initial Developer are Copyright (C) 2006
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Robert Strong <robert.bugzilla@gmail.com>
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
# NSIS defines for nightly builds.
|
||||
# The release build branding.nsi is located in other-license/branding/thunderbird/
|
||||
!define BrandShortName "Instantbird"
|
||||
!define BrandFullName "Instantbird"
|
||||
# BrandFullNameInternal is used for some registry and file system values that
|
||||
# should not contain release that may be in the BrandFullName (e.g. Beta 1, etc.)
|
||||
!define BrandFullNameInternal "Instantbird"
|
||||
!define CompanyName "Instantbird"
|
||||
!define URLInfoAbout "http://www.instantbird.com/"
|
||||
!define URLUpdateInfo "http://www.instantbird.com/"
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
#filter substitution
|
||||
!define AppVersion "@MOZ_APP_VERSION@"
|
||||
!define GREVersion @MOZILLA_VERSION@
|
||||
!define AB_CD "@AB_CD@"
|
||||
!define FileInstallerEXE "@PKG_BASENAME@.installer.exe"
|
||||
!define FileInstallerMSI "@PKG_BASENAME@.installer.msi"
|
||||
!define FileInstallerNETRoot "@PKG_BASENAME@.net-installer"
|
||||
|
||||
!define FileMainEXE "instantbird.exe"
|
||||
!define WindowClass "InstantbirdMessageWindow"
|
||||
|
||||
!define AppRegNameIM "Instantbird"
|
||||
|
||||
!define MinUnsupportedVer "Microsoft Windows 2000"
|
|
@ -0,0 +1,827 @@
|
|||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Mozilla Installer code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Mozilla Foundation
|
||||
# Portions created by the Initial Developer are Copyright (C) 2006
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Robert Strong <robert.bugzilla@gmail.com>
|
||||
# Scott MacGregor <mscott@mozilla.org>
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
# Required Plugins:
|
||||
# ShellLink http://nsis.sourceforge.net/ShellLink_plug-in
|
||||
|
||||
; Set verbosity to 3 (e.g. no script) to lessen the noise in the build logs
|
||||
!verbose 3
|
||||
|
||||
; 7-Zip provides better compression than the lzma from NSIS so we add the files
|
||||
; uncompressed and use 7-Zip to create a SFX archive of it
|
||||
SetDatablockOptimize on
|
||||
SetCompress off
|
||||
CRCCheck on
|
||||
|
||||
!addplugindir ./
|
||||
|
||||
; empty files - except for the comment line - for generating custom pages.
|
||||
!system 'echo ; > options.ini'
|
||||
!system 'echo ; > components.ini'
|
||||
!system 'echo ; > shortcuts.ini'
|
||||
!system 'echo ; > summary.ini'
|
||||
|
||||
Var TmpVal
|
||||
Var StartMenuDir
|
||||
Var InstallType
|
||||
Var AddStartMenuSC
|
||||
Var AddQuickLaunchSC
|
||||
Var AddDesktopSC
|
||||
|
||||
; Other included files may depend upon these includes!
|
||||
; The following includes are provided by NSIS.
|
||||
!include FileFunc.nsh
|
||||
!include LogicLib.nsh
|
||||
!include TextFunc.nsh
|
||||
!include WinMessages.nsh
|
||||
!include WordFunc.nsh
|
||||
!include MUI.nsh
|
||||
|
||||
; WinVer.nsh was added in the same release that RequestExecutionLevel so check
|
||||
; if ___WINVER__NSH___ is defined to determine if RequestExecutionLevel is
|
||||
; available.
|
||||
!include /NONFATAL WinVer.nsh
|
||||
!ifdef ___WINVER__NSH___
|
||||
RequestExecutionLevel admin
|
||||
!else
|
||||
!warning "Installer will be created without Vista compatibility.$\n \
|
||||
Upgrade your NSIS installation to at least version 2.22 to resolve."
|
||||
!endif
|
||||
|
||||
!insertmacro WordFind
|
||||
!insertmacro WordReplace
|
||||
!insertmacro GetSize
|
||||
|
||||
; NSIS provided macros that we have overridden
|
||||
!include overrides.nsh
|
||||
!insertmacro LocateNoDetails
|
||||
!insertmacro TextCompareNoDetails
|
||||
|
||||
; The following includes are custom.
|
||||
!include branding.nsi
|
||||
!include defines.nsi
|
||||
!include common.nsh
|
||||
!include locales.nsi
|
||||
!include version.nsh
|
||||
|
||||
VIAddVersionKey "FileDescription" "${BrandShortName} Installer"
|
||||
|
||||
; Must be inserted before other macros that use logging
|
||||
!insertmacro _LoggingCommon
|
||||
|
||||
!insertmacro AddHandlerValues
|
||||
!insertmacro CloseApp
|
||||
!insertmacro GetPathFromString
|
||||
!insertmacro ManualCloseAppPrompt
|
||||
!insertmacro RegCleanMain
|
||||
!insertmacro RegCleanUninstall
|
||||
!insertmacro WriteRegStr2
|
||||
!insertmacro WriteRegDWORD2
|
||||
|
||||
!include shared.nsh
|
||||
|
||||
; Helper macros for ui callbacks. Insert these after shared.nsh
|
||||
!insertmacro CheckCustomCommon
|
||||
!insertmacro InstallEndCleanupCommon
|
||||
!insertmacro InstallOnInitCommon
|
||||
!insertmacro InstallStartCleanupCommon
|
||||
!insertmacro LeaveDirectoryCommon
|
||||
!insertmacro PreDirectoryCommon
|
||||
|
||||
Name "${BrandFullName}"
|
||||
OutFile "setup.exe"
|
||||
InstallDirRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${BrandFullNameInternal} (${AppVersion})" "InstallLocation"
|
||||
InstallDir "$PROGRAMFILES\${BrandFullName}\"
|
||||
ShowInstDetails nevershow
|
||||
|
||||
ReserveFile options.ini
|
||||
ReserveFile components.ini
|
||||
ReserveFile shortcuts.ini
|
||||
ReserveFile summary.ini
|
||||
|
||||
################################################################################
|
||||
# Modern User Interface - MUI
|
||||
|
||||
!define MUI_ABORTWARNING
|
||||
!define MUI_ICON setup.ico
|
||||
!define MUI_UNICON setup.ico
|
||||
!define MUI_WELCOMEPAGE_TITLE_3LINES
|
||||
!define MUI_HEADERIMAGE
|
||||
!define MUI_HEADERIMAGE_RIGHT
|
||||
!define MUI_WELCOMEFINISHPAGE_BITMAP wizWatermark.bmp
|
||||
|
||||
; Use a right to left header image when the language is right to left
|
||||
!ifdef ${AB_CD}_rtl
|
||||
!define MUI_HEADERIMAGE_BITMAP_RTL wizHeaderRTL.bmp
|
||||
!else
|
||||
!define MUI_HEADERIMAGE_BITMAP wizHeader.bmp
|
||||
!endif
|
||||
|
||||
/**
|
||||
* Installation Pages
|
||||
*/
|
||||
; Welcome Page
|
||||
!insertmacro MUI_PAGE_WELCOME
|
||||
|
||||
; License Page
|
||||
!define MUI_LICENSEPAGE_CHECKBOX
|
||||
!insertmacro MUI_PAGE_LICENSE license.rtf
|
||||
|
||||
; Custom Options Page
|
||||
Page custom preOptions leaveOptions
|
||||
|
||||
; Custom Components Page
|
||||
Page custom preComponents leaveComponents
|
||||
|
||||
; Select Install Directory Page
|
||||
!define MUI_PAGE_CUSTOMFUNCTION_PRE preDirectory
|
||||
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE leaveDirectory
|
||||
!define MUI_DIRECTORYPAGE_VERIFYONLEAVE
|
||||
!insertmacro MUI_PAGE_DIRECTORY
|
||||
|
||||
; Custom Shortcuts Page
|
||||
Page custom preShortcuts leaveShortcuts
|
||||
|
||||
; Start Menu Folder Page Configuration
|
||||
!define MUI_PAGE_CUSTOMFUNCTION_PRE preStartMenu
|
||||
!define MUI_STARTMENUPAGE_NODISABLE
|
||||
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKLM"
|
||||
!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\Mozilla\${BrandFullNameInternal}\${AppVersion} (${AB_CD})\Main"
|
||||
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
|
||||
!insertmacro MUI_PAGE_STARTMENU Application $StartMenuDir
|
||||
|
||||
; Custom Summary Page
|
||||
Page custom preSummary leaveSummary
|
||||
|
||||
; Install Files Page
|
||||
!insertmacro MUI_PAGE_INSTFILES
|
||||
|
||||
; Finish Page
|
||||
!define MUI_FINISHPAGE_NOREBOOTSUPPORT
|
||||
!define MUI_FINISHPAGE_TITLE_3LINES
|
||||
!define MUI_FINISHPAGE_RUN
|
||||
!define MUI_FINISHPAGE_RUN_FUNCTION LaunchApp
|
||||
!define MUI_FINISHPAGE_RUN_TEXT $(LAUNCH_TEXT)
|
||||
!define MUI_PAGE_CUSTOMFUNCTION_PRE preFinish
|
||||
!insertmacro MUI_PAGE_FINISH
|
||||
|
||||
################################################################################
|
||||
# Install Sections
|
||||
|
||||
; Cleanup operations to perform at the start of the installation.
|
||||
Section "-InstallStartCleanup"
|
||||
SetDetailsPrint both
|
||||
DetailPrint $(STATUS_CLEANUP)
|
||||
SetDetailsPrint none
|
||||
|
||||
SetOutPath $INSTDIR
|
||||
${StartInstallLog} "${BrandFullName}" "${AB_CD}" "${AppVersion}" "${GREVersion}"
|
||||
|
||||
; Try to delete the app's main executable and if we can't delete it try to
|
||||
; close the app. This allows running an instance that is located in another
|
||||
; directory and prevents the launching of the app during the installation.
|
||||
; A copy of the executable is placed in a temporary directory so it can be
|
||||
; copied back in the case where a specific file is checked / found to be in
|
||||
; use that would prevent a successful install.
|
||||
|
||||
; Create a temporary backup directory.
|
||||
GetTempFileName $TmpVal "$TEMP"
|
||||
${DeleteFile} $TmpVal
|
||||
SetOutPath $TmpVal
|
||||
|
||||
${If} ${FileExists} "$INSTDIR\${FileMainEXE}"
|
||||
ClearErrors
|
||||
CopyFiles /SILENT "$INSTDIR\${FileMainEXE}" "$TmpVal\${FileMainEXE}"
|
||||
Delete "$INSTDIR\${FileMainEXE}"
|
||||
${If} ${Errors}
|
||||
ClearErrors
|
||||
${CloseApp} "true" $(WARN_APP_RUNNING_INSTALL)
|
||||
; Try to delete it again to prevent launching the app while we are
|
||||
; installing.
|
||||
ClearErrors
|
||||
CopyFiles /SILENT "$INSTDIR\${FileMainEXE}" "$TmpVal\${FileMainEXE}"
|
||||
Delete "$INSTDIR\${FileMainEXE}"
|
||||
${If} ${Errors}
|
||||
ClearErrors
|
||||
; Try closing the app a second time
|
||||
${CloseApp} "true" $(WARN_APP_RUNNING_INSTALL)
|
||||
StrCpy $R1 "${FileMainEXE}"
|
||||
Call CheckInUse
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
|
||||
StrCpy $R1 "freebl3.dll"
|
||||
Call CheckInUse
|
||||
|
||||
StrCpy $R1 "nssckbi.dll"
|
||||
Call CheckInUse
|
||||
|
||||
StrCpy $R1 "nspr4.dll"
|
||||
Call CheckInUse
|
||||
|
||||
StrCpy $R1 "xpicleanup.exe"
|
||||
Call CheckInUse
|
||||
|
||||
SetOutPath $INSTDIR
|
||||
RmDir /r "$TmpVal"
|
||||
ClearErrors
|
||||
|
||||
Call CleanupOldLogs
|
||||
|
||||
${If} ${FileExists} "$INSTDIR\uninstall\uninstall.log"
|
||||
; Diff cleanup.log with uninstall.bak
|
||||
${LogHeader} "Updating Uninstall Log With XPInstall Wizard Logs"
|
||||
StrCpy $R0 "$INSTDIR\uninstall\uninstall.log"
|
||||
StrCpy $R1 "$INSTDIR\uninstall\cleanup.log"
|
||||
GetTempFileName $R2
|
||||
FileOpen $R3 $R2 w
|
||||
${TextCompareNoDetails} "$R1" "$R0" "SlowDiff" "GetDiff"
|
||||
FileClose $R3
|
||||
|
||||
${Unless} ${Errors}
|
||||
${FileJoin} "$INSTDIR\uninstall\uninstall.log" "$R2" "$INSTDIR\uninstall\uninstall.log"
|
||||
${EndUnless}
|
||||
${DeleteFile} "$INSTDIR\uninstall\cleanup.log"
|
||||
${DeleteFile} "$R2"
|
||||
${DeleteFile} "$INSTDIR\uninstall\uninstall.bak"
|
||||
Rename "$INSTDIR\uninstall\uninstall.log" "$INSTDIR\uninstall\uninstall.bak"
|
||||
${EndIf}
|
||||
|
||||
${If} $InstallType == ${INSTALLTYPE_CUSTOM}
|
||||
; Custom installs.
|
||||
; If DOMi is installed and this install includes DOMi remove it from
|
||||
; the installation directory. This will remove it if the user deselected
|
||||
; DOMi on the components page.
|
||||
${If} ${FileExists} "$INSTDIR\extensions\inspector@mozilla.org"
|
||||
${AndIf} ${FileExists} "$EXEDIR\optional\extensions\inspector@mozilla.org"
|
||||
RmDir /r "$INSTDIR\extensions\inspector@mozilla.org"
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
|
||||
${InstallStartCleanupCommon}
|
||||
SectionEnd
|
||||
|
||||
Section "-Application" APP_IDX
|
||||
${StartUninstallLog}
|
||||
|
||||
SetDetailsPrint both
|
||||
DetailPrint $(STATUS_INSTALL_APP)
|
||||
SetDetailsPrint none
|
||||
|
||||
${LogHeader} "Installing Main Files"
|
||||
StrCpy $R0 "$EXEDIR\nonlocalized"
|
||||
StrCpy $R1 "$INSTDIR"
|
||||
Call DoCopyFiles
|
||||
|
||||
; Register DLLs
|
||||
; XXXrstrong - AccessibleMarshal.dll can be used by multiple applications but
|
||||
; is only registered for the last application installed. When the last
|
||||
; application installed is uninstalled AccessibleMarshal.dll will no longer be
|
||||
; registered. bug 338878
|
||||
${LogHeader} "DLL Registration"
|
||||
ClearErrors
|
||||
RegDLL "$INSTDIR\AccessibleMarshal.dll"
|
||||
${If} ${Errors}
|
||||
${LogMsg} "** ERROR Registering: $INSTDIR\AccessibleMarshal.dll **"
|
||||
${Else}
|
||||
${LogUninstall} "DLLReg: \AccessibleMarshal.dll"
|
||||
${LogMsg} "Registered: $INSTDIR\AccessibleMarshal.dll"
|
||||
${EndIf}
|
||||
|
||||
; Write extra files created by the application to the uninstall.log so they
|
||||
; will be removed when the application is uninstalled. To remove an empty
|
||||
; directory write a bogus filename to the deepest directory and all empty
|
||||
; parent directories will be removed.
|
||||
${LogUninstall} "File: \components\compreg.dat"
|
||||
${LogUninstall} "File: \components\xpti.dat"
|
||||
${LogUninstall} "File: \.autoreg"
|
||||
${LogUninstall} "File: \active-update.xml"
|
||||
${LogUninstall} "File: \install.log"
|
||||
${LogUninstall} "File: \install_status.log"
|
||||
${LogUninstall} "File: \install_wizard.log"
|
||||
${LogUninstall} "File: \updates.xml"
|
||||
|
||||
SetDetailsPrint both
|
||||
DetailPrint $(STATUS_INSTALL_LANG)
|
||||
SetDetailsPrint none
|
||||
|
||||
${LogHeader} "Installing Localized Files"
|
||||
StrCpy $R0 "$EXEDIR\localized"
|
||||
StrCpy $R1 "$INSTDIR"
|
||||
Call DoCopyFiles
|
||||
|
||||
; Default for creating Start Menu folder and shortcuts
|
||||
; (1 = create, 0 = don't create)
|
||||
${If} $AddStartMenuSC == ""
|
||||
StrCpy $AddStartMenuSC "1"
|
||||
${EndIf}
|
||||
|
||||
; Default for creating Quick Launch shortcut (1 = create, 0 = don't create)
|
||||
${If} $AddQuickLaunchSC == ""
|
||||
StrCpy $AddQuickLaunchSC "1"
|
||||
${EndIf}
|
||||
|
||||
; Default for creating Desktop shortcut (1 = create, 0 = don't create)
|
||||
${If} $AddDesktopSC == ""
|
||||
StrCpy $AddDesktopSC "1"
|
||||
${EndIf}
|
||||
|
||||
; Remove registry entries for non-existent apps and for apps that point to our
|
||||
; install location in the Software\Mozilla key and uninstall registry entries
|
||||
; that point to our install location for both HKCU and HKLM.
|
||||
SetShellVarContext current ; Set SHCTX to HKCU
|
||||
${RegCleanMain} "Software\Mozilla"
|
||||
${RegCleanUninstall}
|
||||
|
||||
SetShellVarContext all ; Set SHCTX to HKLM
|
||||
${RegCleanMain} "Software\Mozilla"
|
||||
${RegCleanUninstall}
|
||||
|
||||
${LogHeader} "Adding Registry Entries"
|
||||
ClearErrors
|
||||
WriteRegStr HKLM "Software\Mozilla\InstallerTest" "InstallerTest" "Test"
|
||||
${If} ${Errors}
|
||||
SetShellVarContext current ; Set SHCTX to HKCU
|
||||
StrCpy $TmpVal "HKCU" ; used primarily for logging
|
||||
${Else}
|
||||
SetShellVarContext all ; Set SHCTX to HKLM
|
||||
DeleteRegKey HKLM "Software\Mozilla\InstallerTest"
|
||||
StrCpy $TmpVal "HKLM" ; used primarily for logging
|
||||
${EndIf}
|
||||
|
||||
; The previous installer adds several regsitry values to both HKLM and HKCU.
|
||||
; We now try to add to HKLM and if that fails to HKCU
|
||||
|
||||
; The order that reg keys and values are added is important if you use the
|
||||
; uninstall log to remove them on uninstall. When using the uninstall log you
|
||||
; MUST add children first so they will be removed first on uninstall so they
|
||||
; will be empty when the key is deleted. This allows the uninstaller to
|
||||
; specify that only empty keys will be deleted.
|
||||
${SetAppKeys}
|
||||
|
||||
; XXXrstrong - this should be set in shared.nsh along with "Create Quick
|
||||
; Launch Shortcut" and Create Desktop Shortcut.
|
||||
StrCpy $0 "Software\Mozilla\${BrandFullNameInternal}\${AppVersion} (${AB_CD})\Uninstall"
|
||||
${WriteRegDWORD2} $TmpVal "$0" "Create Start Menu Shortcut" $AddStartMenuSC 0
|
||||
|
||||
${FixClassKeys}
|
||||
|
||||
; The following keys should only be set if we can write to HKLM
|
||||
${If} $TmpVal == "HKLM"
|
||||
; Uninstall keys can only exist under HKLM on some versions of windows.
|
||||
${SetUninstallKeys}
|
||||
|
||||
; If we are writing to HKLM and create the quick launch and the desktop
|
||||
; shortcuts set IconsVisible to 1 otherwise to 0.
|
||||
${If} $AddQuickLaunchSC == 1
|
||||
${OrIf} $AddDesktopSC == 1
|
||||
StrCpy $0 "Software\Clients\IM\${BrandFullNameInternal}\InstallInfo"
|
||||
WriteRegDWORD HKLM "$0" "IconsVisible" 1
|
||||
${Else}
|
||||
WriteRegDWORD HKLM "$0" "IconsVisible" 0
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
|
||||
; These need special handling on uninstall since they may be overwritten by
|
||||
; an install into a different location.
|
||||
StrCpy $0 "Software\Microsoft\Windows\CurrentVersion\App Paths\${FileMainEXE}"
|
||||
${WriteRegStr2} $TmpVal "$0" "" "$INSTDIR\${FileMainEXE}" 0
|
||||
${WriteRegStr2} $TmpVal "$0" "Path" "$INSTDIR" 0
|
||||
|
||||
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
|
||||
|
||||
; Create Start Menu shortcuts
|
||||
${LogHeader} "Adding Shortcuts"
|
||||
${If} $AddStartMenuSC == 1
|
||||
${Unless} ${FileExists} "$SMPROGRAMS\$StartMenuDir"
|
||||
CreateDirectory "$SMPROGRAMS\$StartMenuDir"
|
||||
${LogMsg} "Added Start Menu Directory: $SMPROGRAMS\$StartMenuDir"
|
||||
${EndUnless}
|
||||
CreateShortCut "$SMPROGRAMS\$StartMenuDir\${BrandFullNameInternal}.lnk" "$INSTDIR\${FileMainEXE}" "" "$INSTDIR\${FileMainEXE}" 0
|
||||
${LogUninstall} "File: $SMPROGRAMS\$StartMenuDir\${BrandFullNameInternal}.lnk"
|
||||
${LogMsg} "Added Shortcut: $SMPROGRAMS\$StartMenuDir\${BrandFullNameInternal}.lnk"
|
||||
CreateShortCut "$SMPROGRAMS\$StartMenuDir\${BrandFullNameInternal} ($(SAFE_MODE)).lnk" "$INSTDIR\${FileMainEXE}" "-safe-mode" "$INSTDIR\${FileMainEXE}" 0
|
||||
${LogUninstall} "File: $SMPROGRAMS\$StartMenuDir\${BrandFullNameInternal} ($(SAFE_MODE)).lnk"
|
||||
${LogMsg} "Added Shortcut: $SMPROGRAMS\$StartMenuDir\${BrandFullNameInternal} ($(SAFE_MODE)).lnk"
|
||||
${EndIf}
|
||||
|
||||
; perhaps use the uninstall keys
|
||||
${If} $AddQuickLaunchSC == 1
|
||||
CreateShortCut "$QUICKLAUNCH\${BrandFullName}.lnk" "$INSTDIR\${FileMainEXE}" "" "$INSTDIR\${FileMainEXE}" 0
|
||||
${LogUninstall} "File: $QUICKLAUNCH\${BrandFullName}.lnk"
|
||||
${LogMsg} "Added Shortcut: $QUICKLAUNCH\${BrandFullName}.lnk"
|
||||
${EndIf}
|
||||
|
||||
${If} $AddDesktopSC == 1
|
||||
CreateShortCut "$DESKTOP\${BrandFullName}.lnk" "$INSTDIR\${FileMainEXE}" "" "$INSTDIR\${FileMainEXE}" 0
|
||||
${LogUninstall} "File: $DESKTOP\${BrandFullName}.lnk"
|
||||
${LogMsg} "Added Shortcut: $DESKTOP\${BrandFullName}.lnk"
|
||||
${EndIf}
|
||||
|
||||
!insertmacro MUI_STARTMENU_WRITE_END
|
||||
SectionEnd
|
||||
|
||||
Section /o "Developer Tools" DOMI_IDX
|
||||
${If} ${FileExists} "$EXEDIR\optional\extensions\inspector@mozilla.org"
|
||||
SetDetailsPrint both
|
||||
DetailPrint $(STATUS_INSTALL_OPTIONAL)
|
||||
SetDetailsPrint none
|
||||
|
||||
${RemoveDir} "$INSTDIR\extensions\inspector@mozilla.org"
|
||||
ClearErrors
|
||||
${LogHeader} "Installing Developer Tools"
|
||||
StrCpy $R0 "$EXEDIR\optional\extensions\inspector@mozilla.org"
|
||||
StrCpy $R1 "$INSTDIR\extensions\inspector@mozilla.org"
|
||||
Call DoCopyFiles
|
||||
${EndIf}
|
||||
SectionEnd
|
||||
|
||||
; Cleanup operations to perform at the end of the installation.
|
||||
Section "-InstallEndCleanup"
|
||||
SetDetailsPrint both
|
||||
DetailPrint "$(STATUS_CLEANUP)"
|
||||
SetDetailsPrint none
|
||||
${LogHeader} "Updating Uninstall Log With Previous Uninstall Log"
|
||||
|
||||
${InstallEndCleanupCommon}
|
||||
|
||||
; Refresh desktop icons
|
||||
System::Call "shell32::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)"
|
||||
SectionEnd
|
||||
|
||||
################################################################################
|
||||
# Helper Functions
|
||||
|
||||
; Copies a file to a temporary backup directory and then checks if it is in use
|
||||
; by attempting to delete the file. If the file is in use an error is displayed
|
||||
; and the user is given the options to either retry or cancel. If cancel is
|
||||
; selected then the files are restored.
|
||||
Function CheckInUse
|
||||
${If} ${FileExists} "$INSTDIR\$R1"
|
||||
retry:
|
||||
ClearErrors
|
||||
CopyFiles /SILENT "$INSTDIR\$R1" "$TmpVal\$R1"
|
||||
${Unless} ${Errors}
|
||||
Delete "$INSTDIR\$R1"
|
||||
${EndUnless}
|
||||
${If} ${Errors}
|
||||
StrCpy $0 "$INSTDIR\$R1"
|
||||
${WordReplace} "$(^FileError_NoIgnore)" "\r\n" "$\r$\n" "+*" $0
|
||||
MessageBox MB_RETRYCANCEL|MB_ICONQUESTION "$0" IDRETRY retry
|
||||
Delete "$TmpVal\$R1"
|
||||
CopyFiles /SILENT "$TmpVal\*" "$INSTDIR\"
|
||||
SetOutPath $INSTDIR
|
||||
RmDir /r "$TmpVal"
|
||||
Quit
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
FunctionEnd
|
||||
|
||||
Function GetDiff
|
||||
${TrimNewLines} "$9" "$9"
|
||||
${If} $9 != ""
|
||||
FileWrite $R3 "$9$\r$\n"
|
||||
${LogMsg} "Added To Uninstall Log: $9"
|
||||
${EndIf}
|
||||
Push 0
|
||||
FunctionEnd
|
||||
|
||||
Function DoCopyFiles
|
||||
StrLen $R2 $R0
|
||||
${LocateNoDetails} "$R0" "/L=FD" "CopyFile"
|
||||
FunctionEnd
|
||||
|
||||
Function CopyFile
|
||||
StrCpy $R3 $R8 "" $R2
|
||||
retry:
|
||||
ClearErrors
|
||||
${If} $R6 == ""
|
||||
${Unless} ${FileExists} "$R1$R3\$R7"
|
||||
ClearErrors
|
||||
CreateDirectory "$R1$R3\$R7"
|
||||
${If} ${Errors}
|
||||
${LogMsg} "** ERROR Creating Directory: $R1$R3\$R7 **"
|
||||
StrCpy $0 "$R1$R3\$R7"
|
||||
StrCpy $0 "$(ERROR_CREATE_DIRECTORY)"
|
||||
MessageBox MB_RETRYCANCEL|MB_ICONQUESTION "$0" IDRETRY retry
|
||||
Quit
|
||||
${Else}
|
||||
${LogMsg} "Created Directory: $R1$R3\$R7"
|
||||
${EndIf}
|
||||
${EndUnless}
|
||||
${Else}
|
||||
${Unless} ${FileExists} "$R1$R3"
|
||||
ClearErrors
|
||||
CreateDirectory "$R1$R3"
|
||||
${If} ${Errors}
|
||||
${LogMsg} "** ERROR Creating Directory: $R1$R3 **"
|
||||
StrCpy $0 "$R1$R3"
|
||||
StrCpy $0 "$(ERROR_CREATE_DIRECTORY)"
|
||||
MessageBox MB_RETRYCANCEL|MB_ICONQUESTION "$0" IDRETRY retry
|
||||
Quit
|
||||
${Else}
|
||||
${LogMsg} "Created Directory: $R1$R3"
|
||||
${EndIf}
|
||||
${EndUnless}
|
||||
${If} ${FileExists} "$R1$R3\$R7"
|
||||
ClearErrors
|
||||
Delete "$R1$R3\$R7"
|
||||
${If} ${Errors}
|
||||
${LogMsg} "** ERROR Deleting File: $R1$R3\$R7 **"
|
||||
StrCpy $0 "$R1$R3\$R7"
|
||||
${WordReplace} "$(^FileError_NoIgnore)" "\r\n" "$\r$\n" "+*" $0
|
||||
MessageBox MB_RETRYCANCEL|MB_ICONQUESTION "$0" IDRETRY retry
|
||||
Quit
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
ClearErrors
|
||||
|
||||
CopyFiles /SILENT $R9 "$R1$R3"
|
||||
|
||||
${If} ${Errors}
|
||||
${LogMsg} "** ERROR Installing File: $R1$R3\$R7 **"
|
||||
StrCpy $0 "$R1$R3\$R7"
|
||||
${WordReplace} "$(^FileError_NoIgnore)" "\r\n" "$\r$\n" "+*" $0
|
||||
MessageBox MB_RETRYCANCEL|MB_ICONQUESTION "$0" IDRETRY retry
|
||||
Quit
|
||||
${Else}
|
||||
${LogMsg} "Installed File: $R1$R3\$R7"
|
||||
${EndIf}
|
||||
; If the file is installed into the installation directory remove the
|
||||
; installation directory's path from the file path when writing to the
|
||||
; uninstall.log so it will be a relative path. This allows the same
|
||||
; helper.exe to be used with zip builds if we supply an uninstall.log.
|
||||
${WordReplace} "$R1$R3\$R7" "$INSTDIR" "" "+" $R3
|
||||
${LogUninstall} "File: $R3"
|
||||
${EndIf}
|
||||
Push 0
|
||||
FunctionEnd
|
||||
|
||||
; Clean up the old log files. We only diff the first two found since it is
|
||||
; possible for there to be several MB and comparing that many would take a very
|
||||
; long time to diff.
|
||||
Function CleanupOldLogs
|
||||
FindFirst $0 $TmpVal "$INSTDIR\uninstall\*wizard*"
|
||||
StrCmp $TmpVal "" done
|
||||
StrCpy $TmpVal "$INSTDIR\uninstall\$TmpVal"
|
||||
|
||||
FindNext $0 $1
|
||||
StrCmp $1 "" cleanup
|
||||
StrCpy $1 "$INSTDIR\uninstall\$1"
|
||||
Push $1
|
||||
Call DiffOldLogFiles
|
||||
FindClose $0
|
||||
${DeleteFile} "$1"
|
||||
|
||||
cleanup:
|
||||
StrCpy $2 "$INSTDIR\uninstall\cleanup.log"
|
||||
${DeleteFile} "$2"
|
||||
FileOpen $R2 $2 w
|
||||
Push $TmpVal
|
||||
${LineFind} "$INSTDIR\uninstall\$TmpVal" "/NUL" "1:-1" "CleanOldLogFilesCallback"
|
||||
${DeleteFile} "$INSTDIR\uninstall\$TmpVal"
|
||||
done:
|
||||
FindClose $0
|
||||
FileClose $R2
|
||||
FileClose $R3
|
||||
FunctionEnd
|
||||
|
||||
Function DiffOldLogFiles
|
||||
StrCpy $R1 "$1"
|
||||
GetTempFileName $R2
|
||||
FileOpen $R3 $R2 w
|
||||
${TextCompareNoDetails} "$R1" "$TmpVal" "SlowDiff" "GetDiff"
|
||||
FileClose $R3
|
||||
${FileJoin} "$TmpVal" "$R2" "$TmpVal"
|
||||
${DeleteFile} "$R2"
|
||||
FunctionEnd
|
||||
|
||||
Function CleanOldLogFilesCallback
|
||||
${TrimNewLines} "$R9" $R9
|
||||
${WordReplace} "$R9" "$INSTDIR" "" "+" $R3
|
||||
${WordFind} "$R9" " " "E+1}" $R0
|
||||
IfErrors updater 0
|
||||
|
||||
${WordFind} "$R0" "Installing: " "E+1}" $R1
|
||||
${Unless} ${Errors}
|
||||
FileWrite $R2 "File: $R1$\r$\n"
|
||||
GoTo done
|
||||
${EndUnless}
|
||||
|
||||
${WordFind} "$R0" "Replacing: " "E+1}" $R1
|
||||
${Unless} ${Errors}
|
||||
FileWrite $R2 "File: $R1$\r$\n"
|
||||
GoTo done
|
||||
${EndUnless}
|
||||
|
||||
${WordFind} "$R0" "Windows Shortcut: " "E+1}" $R1
|
||||
${Unless} ${Errors}
|
||||
FileWrite $R2 "File: $R1.lnk$\r$\n"
|
||||
GoTo done
|
||||
${EndUnless}
|
||||
|
||||
${WordFind} "$R0" "Create Folder: " "E+1}" $R1
|
||||
${Unless} ${Errors}
|
||||
FileWrite $R2 "Dir: $R1$\r$\n"
|
||||
GoTo done
|
||||
${EndUnless}
|
||||
|
||||
updater:
|
||||
${WordFind} "$R9" "installing: " "E+1}" $R0
|
||||
${Unless} ${Errors}
|
||||
FileWrite $R2 "File: $R0$\r$\n"
|
||||
${EndUnless}
|
||||
|
||||
done:
|
||||
Push 0
|
||||
FunctionEnd
|
||||
|
||||
Function LaunchApp
|
||||
${ManualCloseAppPrompt} "${WindowClass}" "$(WARN_MANUALLY_CLOSE_APP_LAUNCH)"
|
||||
Exec "$INSTDIR\${FileMainEXE}"
|
||||
FunctionEnd
|
||||
|
||||
################################################################################
|
||||
# Language
|
||||
|
||||
!insertmacro MOZ_MUI_LANGUAGE 'baseLocale'
|
||||
!verbose push
|
||||
!verbose 3
|
||||
!include "overrideLocale.nsh"
|
||||
!include "customLocale.nsh"
|
||||
!verbose pop
|
||||
|
||||
; Set this after the locale files to override it if it is in the locale
|
||||
; using " " for BrandingText will hide the "Nullsoft Install System..." branding
|
||||
BrandingText " "
|
||||
|
||||
################################################################################
|
||||
# Page pre and leave functions
|
||||
|
||||
Function preOptions
|
||||
!insertmacro MUI_HEADER_TEXT "$(OPTIONS_PAGE_TITLE)" "$(OPTIONS_PAGE_SUBTITLE)"
|
||||
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "options.ini"
|
||||
FunctionEnd
|
||||
|
||||
Function leaveOptions
|
||||
${MUI_INSTALLOPTIONS_READ} $0 "options.ini" "Settings" "State"
|
||||
${If} $0 != 0
|
||||
Abort
|
||||
${EndIf}
|
||||
${MUI_INSTALLOPTIONS_READ} $R0 "options.ini" "Field 2" "State"
|
||||
StrCmp $R0 "1" +1 +2
|
||||
StrCpy $InstallType ${INSTALLTYPE_BASIC}
|
||||
${MUI_INSTALLOPTIONS_READ} $R0 "options.ini" "Field 3" "State"
|
||||
StrCmp $R0 "1" +1 +2
|
||||
StrCpy $InstallType ${INSTALLTYPE_CUSTOM}
|
||||
FunctionEnd
|
||||
|
||||
Function preComponents
|
||||
${CheckCustomCommon}
|
||||
; If DOMi isn't available skip the components page
|
||||
${Unless} ${FileExists} "$EXEDIR\optional\extensions\inspector@mozilla.org"
|
||||
Abort
|
||||
${EndUnless}
|
||||
!insertmacro MUI_HEADER_TEXT "$(OPTIONAL_COMPONENTS_TITLE)" "$(OPTIONAL_COMPONENTS_SUBTITLE)"
|
||||
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "components.ini"
|
||||
FunctionEnd
|
||||
|
||||
Function leaveComponents
|
||||
${MUI_INSTALLOPTIONS_READ} $R0 "components.ini" "Field 2" "State"
|
||||
; State will be 1 for checked and 0 for unchecked so we can use that to set
|
||||
; the section flags for installation.
|
||||
SectionSetFlags ${DOMI_IDX} $R0
|
||||
FunctionEnd
|
||||
|
||||
Function preDirectory
|
||||
${PreDirectoryCommon}
|
||||
FunctionEnd
|
||||
|
||||
Function leaveDirectory
|
||||
${LeaveDirectoryCommon} "$(WARN_DISK_SPACE)" "$(WARN_WRITE_ACCESS)"
|
||||
FunctionEnd
|
||||
|
||||
Function preShortcuts
|
||||
${CheckCustomCommon}
|
||||
!insertmacro MUI_HEADER_TEXT "$(SHORTCUTS_PAGE_TITLE)" "$(SHORTCUTS_PAGE_SUBTITLE)"
|
||||
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "shortcuts.ini"
|
||||
FunctionEnd
|
||||
|
||||
Function leaveShortcuts
|
||||
${MUI_INSTALLOPTIONS_READ} $0 "shortcuts.ini" "Settings" "State"
|
||||
${If} $0 != 0
|
||||
Abort
|
||||
${EndIf}
|
||||
${MUI_INSTALLOPTIONS_READ} $AddDesktopSC "shortcuts.ini" "Field 2" "State"
|
||||
${MUI_INSTALLOPTIONS_READ} $AddStartMenuSC "shortcuts.ini" "Field 3" "State"
|
||||
${MUI_INSTALLOPTIONS_READ} $AddQuickLaunchSC "shortcuts.ini" "Field 4" "State"
|
||||
FunctionEnd
|
||||
|
||||
Function preStartMenu
|
||||
${CheckCustomCommon}
|
||||
${If} $AddStartMenuSC != 1
|
||||
Abort
|
||||
${EndIf}
|
||||
FunctionEnd
|
||||
|
||||
Function preSummary
|
||||
!insertmacro createSummaryINI
|
||||
!insertmacro MUI_HEADER_TEXT "$(SUMMARY_PAGE_TITLE)" "$(SUMMARY_PAGE_SUBTITLE)"
|
||||
|
||||
; The Summary custom page has a textbox that will automatically receive
|
||||
; focus. This sets the focus to the Install button instead.
|
||||
!insertmacro MUI_INSTALLOPTIONS_INITDIALOG "summary.ini"
|
||||
GetDlgItem $0 $HWNDPARENT 1
|
||||
System::Call "user32::SetFocus(i r0, i 0x0007, i,i)i"
|
||||
${MUI_INSTALLOPTIONS_READ} $1 "summary.ini" "Field 2" "HWND"
|
||||
SendMessage $1 ${WM_SETTEXT} 0 "STR:$INSTDIR"
|
||||
!insertmacro MUI_INSTALLOPTIONS_SHOW
|
||||
FunctionEnd
|
||||
|
||||
Function leaveSummary
|
||||
; If there is a pending deletion from a previous uninstall don't allow
|
||||
; installing until after the system has rebooted.
|
||||
IfFileExists "$INSTDIR\${FileMainEXE}.moz-delete" +1 +4
|
||||
MessageBox MB_YESNO "$(WARN_RESTART_REQUIRED_UNINSTALL)" IDNO +2
|
||||
Reboot
|
||||
Quit
|
||||
|
||||
${If} $InstallType != ${INSTALLTYPE_CUSTOM}
|
||||
; Set DOMi to be installed
|
||||
SectionSetFlags ${DOMI_IDX} 1
|
||||
${EndIf}
|
||||
FunctionEnd
|
||||
|
||||
; When we add an optional action to the finish page the cancel button is
|
||||
; enabled. This disables it and leaves the finish button as the only choice.
|
||||
Function preFinish
|
||||
${EndInstallLog} "${BrandFullName}"
|
||||
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "settings" "cancelenabled" "0"
|
||||
FunctionEnd
|
||||
|
||||
################################################################################
|
||||
# Initialization Functions
|
||||
|
||||
Function .onInit
|
||||
${InstallOnInitCommon} "$(WARN_UNSUPPORTED_MSG)"
|
||||
|
||||
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "options.ini"
|
||||
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "components.ini"
|
||||
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "shortcuts.ini"
|
||||
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "summary.ini"
|
||||
!insertmacro createBasicCustomOptionsINI
|
||||
!insertmacro createComponentsINI
|
||||
!insertmacro createShortcutsINI
|
||||
|
||||
StrCpy $LANGUAGE 0
|
||||
|
||||
; There must always be nonlocalized and localized directories.
|
||||
${GetSize} "$EXEDIR\nonlocalized\" "/S=0K" $R5 $R7 $R8
|
||||
${GetSize} "$EXEDIR\localized\" "/S=0K" $R6 $R7 $R8
|
||||
IntOp $R8 $R5 + $R6
|
||||
SectionSetSize ${APP_IDX} $R8
|
||||
|
||||
${If} ${FileExists} "$EXEDIR\optional\extensions\inspector@mozilla.org"
|
||||
; Set the section size for DOMi.
|
||||
${GetSize} "$EXEDIR\optional\extensions\inspector@mozilla.org" "/S=0K" $0 $8 $9
|
||||
SectionSetSize ${DOMI_IDX} $0
|
||||
${Else}
|
||||
; Hide DOMi in the components page if it isn't available.
|
||||
SectionSetText ${DOMI_IDX} ""
|
||||
${EndIf}
|
||||
FunctionEnd
|
|
@ -0,0 +1,218 @@
|
|||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Mozilla Installer code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Mozilla Foundation
|
||||
# Portions created by the Initial Developer are Copyright (C) 2006
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Robert Strong <robert.bugzilla@gmail.com>
|
||||
# Scott MacGregor <mscott@mozilla.org>
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
!macro PostUpdate
|
||||
SetShellVarContext all
|
||||
|
||||
; Remove registry entries for non-existent apps and for apps that point to our
|
||||
; install location in the Software\Mozilla key and uninstall registry entries
|
||||
; that point to our install location for both HKCU and HKLM.
|
||||
SetShellVarContext current ; Set SHCTX to HKCU
|
||||
${RegCleanMain} "Software\Mozilla"
|
||||
${RegCleanUninstall}
|
||||
|
||||
SetShellVarContext all ; Set SHCTX to HKLM
|
||||
${RegCleanMain} "Software\Mozilla"
|
||||
${RegCleanUninstall}
|
||||
|
||||
; Add Software\Mozilla\ registry entries
|
||||
${SetAppKeys}
|
||||
|
||||
${SetUninstallKeys}
|
||||
|
||||
; Remove files that may be left behind by the application in the
|
||||
; VirtualStore directory.
|
||||
${CleanVirtualStore}
|
||||
|
||||
; Remove talkback if it is present (remove after bug 386760 is fixed)
|
||||
${If} ${FileExists} "$INSTDIR\extensions\talkback@mozilla.org\"
|
||||
RmDir /r "$INSTDIR\extensions\talkback@mozilla.org\"
|
||||
${EndIf}
|
||||
!macroend
|
||||
!define PostUpdate "!insertmacro PostUpdate"
|
||||
|
||||
!macro HideShortcuts
|
||||
StrCpy $R1 "Software\Clients\IM\${BrandFullNameInternal}\InstallInfo"
|
||||
WriteRegDWORD HKLM $R1 "IconsVisible" 0
|
||||
SetShellVarContext all ; Set $DESKTOP to All Users
|
||||
${Unless} ${FileExists} "$DESKTOP\${BrandFullName}.lnk"
|
||||
SetShellVarContext current ; Set $DESKTOP to the current user's desktop
|
||||
${EndUnless}
|
||||
|
||||
${If} ${FileExists} "$DESKTOP\${BrandFullName}.lnk"
|
||||
ShellLink::GetShortCutArgs "$DESKTOP\${BrandFullName}.lnk"
|
||||
Pop $0
|
||||
${If} $0 == ""
|
||||
ShellLink::GetShortCutTarget "$DESKTOP\${BrandFullName}.lnk"
|
||||
Pop $0
|
||||
; Needs to handle short paths
|
||||
${If} $0 == "$INSTDIR\${FileMainEXE}"
|
||||
Delete "$DESKTOP\${BrandFullName}.lnk"
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
|
||||
${If} ${FileExists} "$QUICKLAUNCH\${BrandFullName}.lnk"
|
||||
ShellLink::GetShortCutArgs "$QUICKLAUNCH\${BrandFullName}.lnk"
|
||||
Pop $0
|
||||
${If} $0 == ""
|
||||
ShellLink::GetShortCutTarget "$QUICKLAUNCH\${BrandFullName}.lnk"
|
||||
Pop $0
|
||||
; Needs to handle short paths
|
||||
${If} $0 == "$INSTDIR\${FileMainEXE}"
|
||||
Delete "$QUICKLAUNCH\${BrandFullName}.lnk"
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
!macroend
|
||||
!define HideShortcuts "!insertmacro HideShortcuts"
|
||||
|
||||
!macro ShowShortcuts
|
||||
StrCpy $R1 "Software\Clients\IM\${BrandFullNameInternal}\InstallInfo"
|
||||
WriteRegDWORD HKLM $R1 "IconsVisible" 1
|
||||
SetShellVarContext all ; Set $DESKTOP to All Users
|
||||
${Unless} ${FileExists} "$DESKTOP\${BrandFullName}.lnk"
|
||||
CreateShortCut "$DESKTOP\${BrandFullName}.lnk" "$INSTDIR\${FileMainEXE}" "" "$INSTDIR\${FileMainEXE}" 0
|
||||
ShellLink::SetShortCutWorkingDirectory "$DESKTOP\${BrandFullName}.lnk" "$INSTDIR"
|
||||
${Unless} ${FileExists} "$DESKTOP\${BrandFullName}.lnk"
|
||||
SetShellVarContext current ; Set $DESKTOP to the current user's desktop
|
||||
${Unless} ${FileExists} "$DESKTOP\${BrandFullName}.lnk"
|
||||
CreateShortCut "$DESKTOP\${BrandFullName}.lnk" "$INSTDIR\${FileMainEXE}" "" "$INSTDIR\${FileMainEXE}" 0
|
||||
ShellLink::SetShortCutWorkingDirectory "$DESKTOP\${BrandFullName}.lnk" "$INSTDIR"
|
||||
${EndUnless}
|
||||
${EndUnless}
|
||||
${EndUnless}
|
||||
${Unless} ${FileExists} "$QUICKLAUNCH\${BrandFullName}.lnk"
|
||||
CreateShortCut "$QUICKLAUNCH\${BrandFullName}.lnk" "$INSTDIR\${FileMainEXE}" "" "$INSTDIR\${FileMainEXE}" 0
|
||||
ShellLink::SetShortCutWorkingDirectory "$QUICKLAUNCH\${BrandFullName}.lnk" "$INSTDIR"
|
||||
${EndUnless}
|
||||
!macroend
|
||||
!define ShowShortcuts "!insertmacro ShowShortcuts"
|
||||
|
||||
!macro SetAppKeys
|
||||
StrCpy $0 "Software\Mozilla\${BrandFullNameInternal}\${AppVersion} (${AB_CD})\Main"
|
||||
${WriteRegStr2} $TmpVal "$0" "Install Directory" "$INSTDIR" 0
|
||||
${WriteRegStr2} $TmpVal "$0" "PathToExe" "$INSTDIR\${FileMainEXE}" 0
|
||||
${WriteRegStr2} $TmpVal "$0" "Program Folder Path" "$SMPROGRAMS\$StartMenuDir" 0
|
||||
|
||||
SetShellVarContext all ; Set $DESKTOP to All Users
|
||||
${Unless} ${FileExists} "$DESKTOP\${BrandFullName}.lnk"
|
||||
SetShellVarContext current ; Set $DESKTOP to the current user's desktop
|
||||
${EndUnless}
|
||||
|
||||
${If} ${FileExists} "$DESKTOP\${BrandFullName}.lnk"
|
||||
ShellLink::GetShortCutArgs "$DESKTOP\${BrandFullName}.lnk"
|
||||
Pop $1
|
||||
${If} $1 == ""
|
||||
ShellLink::GetShortCutTarget "$DESKTOP\${BrandFullName}.lnk"
|
||||
Pop $1
|
||||
; Needs to handle short paths
|
||||
${If} $1 == "$INSTDIR\${FileMainEXE}"
|
||||
${WriteRegDWORD2} $TmpVal "$0" "Create Desktop Shortcut" 1 0
|
||||
${Else}
|
||||
${WriteRegDWORD2} $TmpVal "$0" "Create Desktop Shortcut" 0 0
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
|
||||
; XXXrstrong - need a cleaner way to prevent unsetting SHCTX from HKLM when
|
||||
; trying to find the desktop shortcut.
|
||||
${If} $TmpVal == "HKCU"
|
||||
SetShellVarContext current
|
||||
${Else}
|
||||
SetShellVarContext all
|
||||
${EndIf}
|
||||
|
||||
${If} ${FileExists} "$QUICKLAUNCH\${BrandFullName}.lnk"
|
||||
ShellLink::GetShortCutArgs "$QUICKLAUNCH\${BrandFullName}.lnk"
|
||||
Pop $1
|
||||
${If} $1 == ""
|
||||
ShellLink::GetShortCutTarget "$QUICKLAUNCH\${BrandFullName}.lnk"
|
||||
Pop $1
|
||||
; Needs to handle short paths
|
||||
${If} $1 == "$INSTDIR\${FileMainEXE}"
|
||||
${WriteRegDWORD2} $TmpVal "$0" "Create Quick Launch Shortcut" 1 0
|
||||
${Else}
|
||||
${WriteRegDWORD2} $TmpVal "$0" "Create Quick Launch Shortcut" 0 0
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
; XXXrstrong - "Create Start Menu Shortcut" and "Start Menu Folder" are only
|
||||
; set in the installer and should also be set here for software update.
|
||||
|
||||
StrCpy $0 "Software\Mozilla\${BrandFullNameInternal}\${AppVersion} (${AB_CD})\Uninstall"
|
||||
${WriteRegStr2} $TmpVal "$0" "Uninstall Log Folder" "$INSTDIR\uninstall" 0
|
||||
${WriteRegStr2} $TmpVal "$0" "Description" "${BrandFullNameInternal} (${AppVersion})" 0
|
||||
|
||||
StrCpy $0 "Software\Mozilla\${BrandFullNameInternal}\${AppVersion} (${AB_CD})"
|
||||
${WriteRegStr2} $TmpVal "$0" "" "${AppVersion} (${AB_CD})" 0
|
||||
|
||||
StrCpy $0 "Software\Mozilla\${BrandFullNameInternal} ${AppVersion}\bin"
|
||||
${WriteRegStr2} $TmpVal "$0" "PathToExe" "$INSTDIR\${FileMainEXE}" 0
|
||||
|
||||
StrCpy $0 "Software\Mozilla\${BrandFullNameInternal} ${AppVersion}\extensions"
|
||||
${WriteRegStr2} $TmpVal "$0" "Components" "$INSTDIR\components" 0
|
||||
${WriteRegStr2} $TmpVal "$0" "Plugins" "$INSTDIR\plugins" 0
|
||||
|
||||
StrCpy $0 "Software\Mozilla\${BrandFullNameInternal} ${AppVersion}"
|
||||
${WriteRegStr2} $TmpVal "$0" "GeckoVer" "${GREVersion}" 0
|
||||
|
||||
StrCpy $0 "Software\Mozilla\${BrandFullNameInternal}"
|
||||
${WriteRegStr2} $TmpVal "$0" "" "${GREVersion}" 0
|
||||
${WriteRegStr2} $TmpVal "$0" "CurrentVersion" "${AppVersion} (${AB_CD})" 0
|
||||
!macroend
|
||||
!define SetAppKeys "!insertmacro SetAppKeys"
|
||||
|
||||
!macro SetUninstallKeys
|
||||
; Write the uninstall registry keys
|
||||
StrCpy $0 "Software\Microsoft\Windows\CurrentVersion\Uninstall\${BrandFullNameInternal} (${AppVersion})"
|
||||
GetFullPathName $8 "$INSTDIR\${FileMainEXE}"
|
||||
GetFullPathName $7 "$INSTDIR\uninstall\helper.exe"
|
||||
|
||||
${WriteRegStr2} $TmpVal "$0" "Comments" "${BrandFullNameInternal}" 0
|
||||
${WriteRegStr2} $TmpVal "$0" "DisplayIcon" "$8,0" 0
|
||||
${WriteRegStr2} $TmpVal "$0" "DisplayName" "${BrandFullNameInternal} (${AppVersion})" 0
|
||||
${WriteRegStr2} $TmpVal "$0" "DisplayVersion" "${AppVersion} (${AB_CD})" 0
|
||||
${WriteRegStr2} $TmpVal "$0" "InstallLocation" "$INSTDIR" 0
|
||||
${WriteRegStr2} $TmpVal "$0" "Publisher" "Instantbird" 0
|
||||
${WriteRegStr2} $TmpVal "$0" "UninstallString" "$7" 0
|
||||
${WriteRegStr2} $TmpVal "$0" "URLInfoAbout" "${URLInfoAbout}" 0
|
||||
${WriteRegStr2} $TmpVal "$0" "URLUpdateInfo" "${URLUpdateInfo}" 0
|
||||
${WriteRegDWORD2} $TmpVal "$0" "NoModify" 1 0
|
||||
${WriteRegDWORD2} $TmpVal "$0" "NoRepair" 1 0
|
||||
!macroend
|
||||
!define SetUninstallKeys "!insertmacro SetUninstallKeys"
|
|
@ -0,0 +1,351 @@
|
|||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Mozilla Installer code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Mozilla Foundation
|
||||
# Portions created by the Initial Developer are Copyright (C) 2006
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Robert Strong <robert.bugzilla@gmail.com>
|
||||
# Scott MacGregor <mscott@mozilla.org>
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
# Required Plugins:
|
||||
# ShellLink http://nsis.sourceforge.net/ShellLink_plug-in
|
||||
|
||||
; Set verbosity to 3 (e.g. no script) to lessen the noise in the build logs
|
||||
!verbose 3
|
||||
|
||||
; 7-Zip provides better compression than the lzma from NSIS so we add the files
|
||||
; uncompressed and use 7-Zip to create a SFX archive of it
|
||||
SetDatablockOptimize on
|
||||
SetCompress off
|
||||
CRCCheck on
|
||||
|
||||
!addplugindir ./
|
||||
|
||||
; prevents compiling of the reg write logging.
|
||||
!define NO_LOG
|
||||
|
||||
Var TmpVal
|
||||
|
||||
; Other included files may depend upon these includes!
|
||||
; The following includes are provided by NSIS.
|
||||
!include FileFunc.nsh
|
||||
!include LogicLib.nsh
|
||||
!include TextFunc.nsh
|
||||
!include WinMessages.nsh
|
||||
!include WordFunc.nsh
|
||||
!include MUI.nsh
|
||||
|
||||
; WinVer.nsh was added in the same release that RequestExecutionLevel so check
|
||||
; if ___WINVER__NSH___ is defined to determine if RequestExecutionLevel is
|
||||
; available.
|
||||
!include /NONFATAL WinVer.nsh
|
||||
!ifdef ___WINVER__NSH___
|
||||
RequestExecutionLevel admin
|
||||
!else
|
||||
!warning "Uninstaller will be created without Vista compatibility.$\n \
|
||||
Upgrade your NSIS installation to at least version 2.22 to resolve."
|
||||
!endif
|
||||
|
||||
!insertmacro WordFind
|
||||
!insertmacro WordReplace
|
||||
|
||||
!insertmacro un.GetParent
|
||||
!insertmacro un.LineFind
|
||||
!insertmacro un.TrimNewLines
|
||||
|
||||
; The following includes are custom.
|
||||
!include branding.nsi
|
||||
!include defines.nsi
|
||||
!include common.nsh
|
||||
!include locales.nsi
|
||||
!include version.nsh
|
||||
|
||||
; This is named BrandShortName helper because we use this for software update
|
||||
; post update cleanup.
|
||||
VIAddVersionKey "FileDescription" "${BrandShortName} Helper"
|
||||
|
||||
!insertmacro AddHandlerValues
|
||||
!insertmacro CleanVirtualStore
|
||||
!insertmacro GetLongPath
|
||||
!insertmacro GetPathFromString
|
||||
!insertmacro RegCleanMain
|
||||
!insertmacro RegCleanUninstall
|
||||
!insertmacro WriteRegDWORD2
|
||||
!insertmacro WriteRegStr2
|
||||
|
||||
!insertmacro un.CleanVirtualStore
|
||||
!insertmacro un.GetLongPath
|
||||
!insertmacro un.GetSecondInstallPath
|
||||
!insertmacro un.ManualCloseAppPrompt
|
||||
!insertmacro un.ParseUninstallLog
|
||||
!insertmacro un.RegCleanMain
|
||||
!insertmacro un.RegCleanUninstall
|
||||
!insertmacro un.RemoveQuotesFromPath
|
||||
|
||||
!include shared.nsh
|
||||
|
||||
; Helper macros for ui callbacks. Insert these after shared.nsh
|
||||
!insertmacro UninstallOnInitCommon
|
||||
|
||||
Name "${BrandFullName}"
|
||||
OutFile "helper.exe"
|
||||
InstallDirRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${BrandFullNameInternal} (${AppVersion})" "InstallLocation"
|
||||
InstallDir "$PROGRAMFILES\${BrandFullName}"
|
||||
ShowUnInstDetails nevershow
|
||||
|
||||
################################################################################
|
||||
# Modern User Interface - MUI
|
||||
|
||||
!define MUI_ABORTWARNING
|
||||
!define MUI_ICON setup.ico
|
||||
!define MUI_UNICON setup.ico
|
||||
!define MUI_WELCOMEPAGE_TITLE_3LINES
|
||||
!define MUI_HEADERIMAGE
|
||||
!define MUI_HEADERIMAGE_RIGHT
|
||||
!define MUI_UNWELCOMEFINISHPAGE_BITMAP wizWatermark.bmp
|
||||
|
||||
; Use a right to left header image when the language is right to left
|
||||
!ifdef ${AB_CD}_rtl
|
||||
!define MUI_HEADERIMAGE_BITMAP_RTL wizHeaderRTL.bmp
|
||||
!else
|
||||
!define MUI_HEADERIMAGE_BITMAP wizHeader.bmp
|
||||
!endif
|
||||
|
||||
/**
|
||||
* Uninstall Pages
|
||||
*/
|
||||
; Welcome Page
|
||||
!insertmacro MUI_UNPAGE_WELCOME
|
||||
|
||||
; Uninstall Confirm Page
|
||||
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE un.leaveConfirm
|
||||
!insertmacro MUI_UNPAGE_CONFIRM
|
||||
|
||||
; Remove Files Page
|
||||
!insertmacro MUI_UNPAGE_INSTFILES
|
||||
|
||||
; Finish Page
|
||||
!define MUI_PAGE_CUSTOMFUNCTION_PRE un.preFinish
|
||||
!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
|
||||
!define MUI_FINISHPAGE_SHOWREADME ""
|
||||
|
||||
!insertmacro MUI_UNPAGE_FINISH
|
||||
|
||||
################################################################################
|
||||
# Install Sections
|
||||
; Empty section required for the installer to compile as an uninstaller
|
||||
Section ""
|
||||
SectionEnd
|
||||
|
||||
################################################################################
|
||||
# Uninstall Sections
|
||||
|
||||
Section "Uninstall"
|
||||
SetDetailsPrint textonly
|
||||
DetailPrint $(STATUS_UNINSTALL_MAIN)
|
||||
SetDetailsPrint none
|
||||
|
||||
; Delete the app exe to prevent launching the app while we are uninstalling.
|
||||
ClearErrors
|
||||
${DeleteFile} "$INSTDIR\${FileMainEXE}"
|
||||
${If} ${Errors}
|
||||
; If the user closed the application it can take several seconds for it to
|
||||
; shut down completely. If the application is being used by another user we
|
||||
; can still delete the files when the system is restarted.
|
||||
Sleep 5000
|
||||
${DeleteFile} "$INSTDIR\${FileMainEXE}"
|
||||
ClearErrors
|
||||
${EndIf}
|
||||
|
||||
; Remove registry entries for non-existent apps and for apps that point to our
|
||||
; install location in the Software\Mozilla key and uninstall registry entries
|
||||
; that point to our install location for both HKCU and HKLM.
|
||||
SetShellVarContext current ; Sets SHCTX to HKCU
|
||||
${un.RegCleanMain} "Software\Mozilla"
|
||||
${un.RegCleanUninstall}
|
||||
|
||||
SetShellVarContext all ; Sets SHCTX to HKLM
|
||||
${un.RegCleanMain} "Software\Mozilla"
|
||||
${un.RegCleanUninstall}
|
||||
|
||||
SetShellVarContext all ; Set SHCTX to HKLM
|
||||
${un.GetSecondInstallPath} "Software\Mozilla" $R9
|
||||
${If} $R9 == "false"
|
||||
SetShellVarContext current ; Set SHCTX to HKCU
|
||||
${un.GetSecondInstallPath} "Software\Mozilla" $R9
|
||||
${EndIf}
|
||||
|
||||
StrCpy $0 "Software\Clients\IM\${BrandFullNameInternal}\shell\open\command"
|
||||
ReadRegStr $R1 HKLM "$0" ""
|
||||
${un.RemoveQuotesFromPath} "$R1" $R1
|
||||
${un.GetParent} "$R1" $R1
|
||||
|
||||
; Only remove the Clients\IM key if it refers to this
|
||||
; install location. The Clients\IM is independent
|
||||
; of the default app for the OS settings. The XPInstall base un-installer
|
||||
; always removes these keys if it is uninstalling the default app and it
|
||||
; will always replace the keys when installing even if there is another
|
||||
; install of Thunderbird that is set as the
|
||||
; default app. Now the keys are always updated on install but are only
|
||||
; removed if they refer to this install location.
|
||||
${If} "$INSTDIR" == "$R1"
|
||||
; XXXrstrong - if there is another installation of the same app ideally we
|
||||
; would just modify these values. The GetSecondInstallPath macro could be
|
||||
; made to provide enough information to do this.
|
||||
DeleteRegKey HKLM "Software\Clients\IM\${BrandFullNameInternal}"
|
||||
DeleteRegValue HKLM "Software\RegisteredApplications" "${AppRegNameIM}"
|
||||
${EndIf}
|
||||
|
||||
StrCpy $0 "Software\Microsoft\Windows\CurrentVersion\App Paths\${FileMainEXE}"
|
||||
${If} $R9 == "false"
|
||||
DeleteRegKey HKLM "$0"
|
||||
DeleteRegKey HKCU "$0"
|
||||
${Else}
|
||||
ReadRegStr $R1 HKLM "$0" ""
|
||||
${un.RemoveQuotesFromPath} "$R1" $R1
|
||||
${un.GetParent} "$R1" $R1
|
||||
${If} "$INSTDIR" == "$R1"
|
||||
WriteRegStr HKLM "$0" "" "$R9"
|
||||
${un.GetParent} "$R9" $R1
|
||||
WriteRegStr HKLM "$0" "Path" "$R1"
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
|
||||
; Remove directories and files we always control before parsing the uninstall
|
||||
; log so empty directories can be removed.
|
||||
${If} ${FileExists} "$INSTDIR\updates"
|
||||
RmDir /r /REBOOTOK "$INSTDIR\updates"
|
||||
${EndIf}
|
||||
${If} ${FileExists} "$INSTDIR\defaults\shortcuts"
|
||||
RmDir /r /REBOOTOK "$INSTDIR\defaults\shortcuts"
|
||||
${EndIf}
|
||||
${If} ${FileExists} "$INSTDIR\distribution"
|
||||
RmDir /r /REBOOTOK "$INSTDIR\distribution"
|
||||
${EndIf}
|
||||
${If} ${FileExists} "$INSTDIR\removed-files"
|
||||
Delete /REBOOTOK "$INSTDIR\removed-files"
|
||||
${EndIf}
|
||||
|
||||
; Parse the uninstall log to unregister dll's and remove all installed
|
||||
; files / directories this install is responsible for.
|
||||
${un.ParseUninstallLog}
|
||||
|
||||
; Remove the uninstall directory that we control
|
||||
RmDir /r /REBOOTOK "$INSTDIR\uninstall"
|
||||
|
||||
; Remove the installation directory if it is empty
|
||||
${RemoveDir} "$INSTDIR"
|
||||
|
||||
; Remove files that may be left behind by the application in the
|
||||
; VirtualStore directory.
|
||||
${un.CleanVirtualStore}
|
||||
|
||||
; If firefox.exe was successfully deleted yet we still need to restart to
|
||||
; remove other files create a dummy firefox.exe.moz-delete to prevent the
|
||||
; installer from allowing an install without restart when it is required
|
||||
; to complete an uninstall.
|
||||
${If} ${RebootFlag}
|
||||
${Unless} ${FileExists} "$INSTDIR\${FileMainEXE}.moz-delete"
|
||||
FileOpen $0 "$INSTDIR\${FileMainEXE}.moz-delete" w
|
||||
FileWrite $0 "Will be deleted on restart"
|
||||
Delete /REBOOTOK "$INSTDIR\${FileMainEXE}.moz-delete"
|
||||
FileClose $0
|
||||
${EndUnless}
|
||||
${EndIf}
|
||||
|
||||
; Refresh desktop icons otherwise the start menu internet item won't be
|
||||
; removed and other ugly things will happen like recreation of the app's
|
||||
; clients registry key by the OS under some conditions.
|
||||
System::Call "shell32::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)"
|
||||
SectionEnd
|
||||
|
||||
################################################################################
|
||||
# Helper Functions
|
||||
|
||||
|
||||
################################################################################
|
||||
# Language
|
||||
|
||||
!insertmacro MOZ_MUI_LANGUAGE 'baseLocale'
|
||||
!verbose push
|
||||
!verbose 3
|
||||
!include "overrideLocale.nsh"
|
||||
!include "customLocale.nsh"
|
||||
!verbose pop
|
||||
|
||||
; Set this after the locale files to override it if it is in the locale. Using
|
||||
; " " for BrandingText will hide the "Nullsoft Install System..." branding.
|
||||
BrandingText " "
|
||||
|
||||
################################################################################
|
||||
# Page pre and leave functions
|
||||
|
||||
; Checks if the app being uninstalled is running.
|
||||
Function un.leaveConfirm
|
||||
; Try to delete the app executable and if we can't delete it try to find the
|
||||
; app's message window and prompt the user to close the app. This allows
|
||||
; running an instance that is located in another directory. If for whatever
|
||||
; reason there is no message window we will just rename the app's files and
|
||||
; then remove them on restart if they are in use.
|
||||
StrCpy $TmpVal ""
|
||||
ClearErrors
|
||||
${DeleteFile} "$INSTDIR\${FileMainEXE}"
|
||||
${If} ${Errors}
|
||||
${un.ManualCloseAppPrompt} "${WindowClass}" "$(WARN_MANUALLY_CLOSE_APP_UNINSTALL)"
|
||||
${EndIf}
|
||||
FunctionEnd
|
||||
|
||||
Function un.preFinish
|
||||
; Do not modify the finish page if there is a reboot pending
|
||||
${Unless} ${RebootFlag}
|
||||
; When we add an optional action to the finish page the cancel button
|
||||
; is enabled. This disables it and leaves the finish button as the
|
||||
; only choice.
|
||||
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "settings" "cancelenabled" "0"
|
||||
!endif
|
||||
${EndUnless}
|
||||
FunctionEnd
|
||||
|
||||
################################################################################
|
||||
# Initialization Functions
|
||||
|
||||
Function .onInit
|
||||
${UninstallOnInitCommon}
|
||||
FunctionEnd
|
||||
|
||||
Function un.onInit
|
||||
GetFullPathName $INSTDIR "$INSTDIR\.."
|
||||
${un.GetLongPath} "$INSTDIR" $INSTDIR
|
||||
${Unless} ${FileExists} "$INSTDIR\${FileMainEXE}"
|
||||
Abort
|
||||
${EndUnless}
|
||||
StrCpy $LANGUAGE 0
|
||||
FunctionEnd
|
|
@ -0,0 +1,12 @@
|
|||
|
||||
; IMPORTANT: This file should always start with a newline in case a locale
|
||||
; provided updater.ini does not end with a newline.
|
||||
; Application to launch after an update has been successfully applied. This
|
||||
; must be in the same directory or a sub-directory of the directory of the
|
||||
; application executable that initiated the software update.
|
||||
[PostUpdateWin]
|
||||
; ExeRelPath is the path to the PostUpdateWin executable relative to the
|
||||
; application executable.
|
||||
ExeRelPath=uninstall\helper.exe
|
||||
; ExeArg is the argument to pass to the PostUpdateWin exe
|
||||
ExeArg=/PostUpdate
|
|
@ -0,0 +1,392 @@
|
|||
#filter substitution
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Base Thunderbird Package File for Win32
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
[@AB_CD@]
|
||||
bin\chrome\@AB_CD@.jar
|
||||
bin\chrome\@AB_CD@.manifest
|
||||
bin\dictionaries\*
|
||||
bin\uninstall\helper.exe
|
||||
bin\updater.ini
|
||||
bin\isp\@AB_CD@\*
|
||||
|
||||
[xpcom]
|
||||
bin\xpcom.dll
|
||||
bin\xpcom_core.dll
|
||||
bin\components\jar50.dll
|
||||
bin\nspr4.dll
|
||||
bin\plc4.dll
|
||||
bin\plds4.dll
|
||||
bin\js3250.dll
|
||||
bin\components\jsd3250.dll
|
||||
bin\components\xpinstal.dll
|
||||
bin\Microsoft.VC80.CRT.manifest
|
||||
bin\msvcm80.dll
|
||||
bin\msvcp80.dll
|
||||
bin\msvcr80.dll
|
||||
|
||||
; Modules
|
||||
bin\modules\*
|
||||
|
||||
; Optional RSS extension
|
||||
[newsblog]
|
||||
bin\chrome\newsblog.jar
|
||||
bin\chrome\newsblog.manifest
|
||||
bin\components\newsblog.js
|
||||
|
||||
[mail]
|
||||
|
||||
bin\thunderbird.exe
|
||||
bin\application.ini
|
||||
bin\platform.ini
|
||||
bin\LICENSE.txt
|
||||
bin\license.html
|
||||
bin\README.txt
|
||||
bin\sqlite3.dll
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Mail Specific Files
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
bin\defaults\messenger\mailViews.dat
|
||||
bin\defaults\profile\localstore.rdf
|
||||
bin\defaults\profile\prefs.js
|
||||
bin\defaults\profile\mimeTypes.rdf
|
||||
|
||||
bin\isp\*
|
||||
|
||||
bin\components\addrbook.xpt
|
||||
bin\components\mime.xpt
|
||||
bin\components\mailnews.xpt
|
||||
bin\components\msgbase.xpt
|
||||
bin\components\msgcompo.xpt
|
||||
bin\components\msgdb.xpt
|
||||
bin\components\msgimap.xpt
|
||||
bin\components\msglocal.xpt
|
||||
bin\components\msgnews.xpt
|
||||
bin\components\msgsearch.xpt
|
||||
bin\components\import.xpt
|
||||
bin\components\impComm4xMail.xpt
|
||||
bin\components\mailview.xpt
|
||||
bin\components\mailprofilemigration.xpt
|
||||
bin\components\shellservice.xpt
|
||||
bin\components\xpcom_base.xpt
|
||||
bin\components\xpcom_system.xpt
|
||||
bin\components\xpcom_components.xpt
|
||||
bin\components\xpcom_ds.xpt
|
||||
bin\components\xpcom_io.xpt
|
||||
bin\components\xpcom_thread.xpt
|
||||
bin\components\xpcom_xpti.xpt
|
||||
bin\chrome\toolkit.jar
|
||||
bin\chrome\toolkit.manifest
|
||||
bin\chrome\comm.jar
|
||||
bin\chrome\comm.manifest
|
||||
bin\chrome\pippki.jar
|
||||
bin\chrome\pippki.manifest
|
||||
bin\chrome\messenger.jar
|
||||
bin\chrome\messenger.manifest
|
||||
bin\chrome\icons\default\abcardWindow.ico
|
||||
bin\chrome\icons\default\addressbookWindow.ico
|
||||
bin\chrome\icons\default\messengerWindow.ico
|
||||
bin\chrome\icons\default\msgcomposeWindow.ico
|
||||
bin\extensions\{972ce4c6-7e08-4474-a285-3208198ce6fd}\install.rdf
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Mail Extensions (smime, etc.)
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
bin\MapiProxy.dll
|
||||
bin\mozMapi32.dll
|
||||
bin\components\mapihook.xpt
|
||||
bin\components\nsSetDefaultMail.js
|
||||
bin\components\offlineStartup.js
|
||||
bin\components\nsMailDefaultHandler.js
|
||||
|
||||
bin\components\mdn-service.js
|
||||
|
||||
bin\components\smime-service.js
|
||||
bin\components\msgsmime.xpt
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Chrome Files
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
bin\chrome\classic.jar
|
||||
bin\chrome\classic.manifest
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Default Profile Settings
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
; default pref files
|
||||
bin\defaults\pref\*
|
||||
bin\greprefs\*
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; App extensions to Mail
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
; LDAP components
|
||||
bin\components\mozldap.xpt
|
||||
bin\components\nsLDAPPrefsService.js
|
||||
bin\components\nsAbLDAPAttributeMap.js
|
||||
bin\nsldap32v60.dll
|
||||
bin\nsldappr32v60.dll
|
||||
bin\nsldif32v60.dll
|
||||
|
||||
; wallet
|
||||
bin\components\wallet.xpt
|
||||
bin\components\signonviewer.xpt
|
||||
|
||||
; download progress
|
||||
bin\components\nsHelperAppDlg.js
|
||||
bin\components\nsDownloadManagerUI.js
|
||||
bin\components\nsProgressDialog.js
|
||||
bin\components\downloads.xpt
|
||||
|
||||
; Protocol/Content handling
|
||||
bin\components\nsContentDispatchChooser.js
|
||||
bin\components\nsHandlerService.js
|
||||
bin\components\nsWebHandlerApp.js
|
||||
|
||||
; spellchecker (may not be present)
|
||||
bin\components\spellchecker.xpt
|
||||
|
||||
; xpinstall (needed to dynamically install themes
|
||||
bin\components\xpinstall.xpt
|
||||
|
||||
; misson control, autoconfig
|
||||
bin\defaults\autoconfig\platform.js
|
||||
bin\defaults\autoconfig\prefcalls.js
|
||||
bin\components\autoconfig.xpt
|
||||
|
||||
; Phishing Protection
|
||||
bin\components\nsPhishingProtectionApplication.js
|
||||
bin\components\nsUrlClassifierListManager.js
|
||||
bin\components\nsUrlClassifierLib.js
|
||||
bin\components\url-classifier.xpt
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Base Package Files
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
; xpconnect
|
||||
bin\components\xpconnect.xpt
|
||||
|
||||
; XP widgets/graphics
|
||||
bin\components\widget.xpt
|
||||
bin\components\gfx.xpt
|
||||
|
||||
; layout
|
||||
bin\components\layout_base.xpt
|
||||
bin\components\layout_printing.xpt
|
||||
bin\components\layout_xul.xpt
|
||||
bin\components\content_base.xpt
|
||||
bin\components\htmlparser.xpt
|
||||
bin\components\content_html.xpt
|
||||
bin\components\content_htmldoc.xpt
|
||||
bin\components\content_xmldoc.xpt
|
||||
bin\components\content_xslt.xpt
|
||||
bin\components\xultmpl.xpt
|
||||
bin\components\xuldoc.xpt
|
||||
bin\components\xulapp.xpt
|
||||
bin\components\inspector.xpt
|
||||
|
||||
; Imaging:
|
||||
bin\components\imgicon.xpt
|
||||
bin\components\imglib2.xpt
|
||||
|
||||
; accessibility (out of process API support)
|
||||
bin\components\accessibility.xpt
|
||||
bin\components\accessibility-msaa.xpt
|
||||
|
||||
; caps (JavaScript security)
|
||||
bin\components\caps.xpt
|
||||
|
||||
; glue: appshell, docshell, uriloader, chrome, components
|
||||
bin\components\appshell.xpt
|
||||
bin\components\appstartup.xpt
|
||||
bin\components\docshell_base.xpt
|
||||
bin\components\uriloader.xpt
|
||||
bin\components\webBrowser_core.xpt
|
||||
bin\components\windowwatcher.xpt
|
||||
bin\components\webbrowserpersist.xpt
|
||||
bin\components\commandhandler.xpt
|
||||
; we need mozbrwser.xpt for nsIXULWindow.xpt
|
||||
bin\components\mozbrwsr.xpt
|
||||
|
||||
; jar
|
||||
bin\components\jar.xpt
|
||||
|
||||
; prefs
|
||||
bin\components\pref.xpt
|
||||
|
||||
; profile
|
||||
bin\components\profile.xpt
|
||||
bin\components\toolkitprofile.xpt
|
||||
|
||||
; toolkit
|
||||
bin\components\appstartup.xpt
|
||||
bin\components\commandlines.xpt
|
||||
bin\components\chrome.xpt
|
||||
|
||||
; rdf
|
||||
bin\components\rdf.xpt
|
||||
|
||||
; required i18n libraries
|
||||
bin\components\intl.xpt
|
||||
bin\components\locale.xpt
|
||||
bin\components\uconv.xpt
|
||||
bin\components\unicharutil.xpt
|
||||
|
||||
; dom
|
||||
bin\components\dom.xpt
|
||||
bin\components\dom_base.xpt
|
||||
bin\components\dom_canvas.xpt
|
||||
bin\components\dom_core.xpt
|
||||
bin\components\dom_css.xpt
|
||||
bin\components\dom_events.xpt
|
||||
bin\components\dom_html.xpt
|
||||
bin\components\dom_json.xpt
|
||||
bin\components\dom_offline.xpt
|
||||
bin\components\dom_range.xpt
|
||||
bin\components\dom_storage.xpt
|
||||
bin\components\dom_stylesheets.xpt
|
||||
bin\components\dom_traversal.xpt
|
||||
bin\components\dom_views.xpt
|
||||
bin\components\dom_xbl.xpt
|
||||
bin\components\dom_xul.xpt
|
||||
bin\components\dom_loadsave.xpt
|
||||
|
||||
; editor / composer for HTML compose
|
||||
bin\components\editor.xpt
|
||||
bin\components\composer.xpt
|
||||
bin\components\txmgr.xpt
|
||||
|
||||
; find functionality
|
||||
; Optional - only if your code uses nsIWebBrowserFind
|
||||
bin\components\txtsvc.xpt
|
||||
|
||||
; moz storage
|
||||
bin\components\storage.xpt
|
||||
|
||||
; netwerk
|
||||
bin\components\necko.xpt
|
||||
bin\components\necko_dns.xpt
|
||||
bin\components\necko_http.xpt
|
||||
bin\components\necko_res.xpt
|
||||
bin\components\necko_strconv.xpt
|
||||
bin\components\necko_file.xpt
|
||||
bin\components\necko_cache.xpt
|
||||
bin\components\necko_cookie.xpt
|
||||
bin\components\necko_socket.xpt
|
||||
bin\components\nsProxyAutoConfig.js
|
||||
|
||||
; extensions
|
||||
bin\components\nsAddonRepository.js
|
||||
bin\components\nsExtensionManager.js
|
||||
bin\components\nsBlocklistService.js
|
||||
bin\components\nsUpdateService.js
|
||||
bin\components\nsPostUpdateWin.js
|
||||
bin\components\extensions.xpt
|
||||
bin\components\update.xpt
|
||||
#ifdef MOZ_WEBSERVICES
|
||||
bin\components\websrvcs.xpt
|
||||
#endif
|
||||
bin\components\nsURLFormatter.js
|
||||
bin\components\urlformatter.xpt
|
||||
|
||||
; plugins
|
||||
bin\components\plugin.xpt
|
||||
|
||||
; psm2
|
||||
; Optional - only if you need HTTPS support
|
||||
bin\components\pipboot.xpt
|
||||
bin\components\pipnss.xpt
|
||||
bin\components\pippki.xpt
|
||||
bin\nss3.dll
|
||||
bin\nssutil3.dll
|
||||
bin\smime3.dll
|
||||
bin\softokn3.chk
|
||||
bin\softokn3.dll
|
||||
bin\freebl3.chk
|
||||
bin\freebl3.dll
|
||||
bin\ssl3.dll
|
||||
bin\nssckbi.dll
|
||||
bin\nssdbm3.dll
|
||||
|
||||
; core platform files
|
||||
bin\components\xpautocomplete.xpt
|
||||
bin\components\autocomplete.xpt
|
||||
bin\components\alerts.xpt
|
||||
bin\components\jsdservice.xpt
|
||||
bin\components\fastfind.xpt
|
||||
bin\components\find.xpt
|
||||
bin\components\chardet.xpt
|
||||
bin\components\jsconsole-clhandler.js
|
||||
bin\components\layout_xul_tree.xpt
|
||||
bin\components\mozfind.xpt
|
||||
bin\components\mimetype.xpt
|
||||
bin\components\proxyObject.xpt
|
||||
bin\components\exthandler.xpt
|
||||
bin\components\embed_base.xpt
|
||||
bin\components\webshell_idls.xpt
|
||||
bin\components\widget.xpt
|
||||
bin\components\windowds.xpt
|
||||
bin\components\dom_xpath.xpt
|
||||
bin\AccessibleMarshal.dll
|
||||
bin\components\lwbrk.xpt
|
||||
bin\components\nsTryToClose.js
|
||||
bin\components\pluginGlue.js
|
||||
bin\components\txEXSLTRegExFunctions.js
|
||||
bin\components\feeds.xpt
|
||||
bin\components\saxparser.xpt
|
||||
bin\components\zipwriter.xpt
|
||||
|
||||
bin\res\hiddenWindow.html
|
||||
bin\res\ua.css
|
||||
bin\res\html.css
|
||||
bin\res\quirk.css
|
||||
bin\res\forms.css
|
||||
bin\res\charsetData.properties
|
||||
bin\res\charsetalias.properties
|
||||
bin\res\langGroups.properties
|
||||
bin\res\language.properties
|
||||
bin\res\wincharset.properties
|
||||
bin\res\entityTables\*
|
||||
bin\res\dtd\xhtml11.dtd
|
||||
|
||||
; editor resource files
|
||||
bin\res\EditorOverride.css
|
||||
bin\res\grabber.gif
|
||||
bin\res\table-add-column-after-active.gif
|
||||
bin\res\table-add-column-after-hover.gif
|
||||
bin\res\table-add-column-after.gif
|
||||
bin\res\table-add-column-before-active.gif
|
||||
bin\res\table-add-column-before-hover.gif
|
||||
bin\res\table-add-column-before.gif
|
||||
bin\res\table-add-row-after-active.gif
|
||||
bin\res\table-add-row-after-hover.gif
|
||||
bin\res\table-add-row-after.gif
|
||||
bin\res\table-add-row-before-active.gif
|
||||
bin\res\table-add-row-before-hover.gif
|
||||
bin\res\table-add-row-before.gif
|
||||
bin\res\table-remove-column-active.gif
|
||||
bin\res\table-remove-column-hover.gif
|
||||
bin\res\table-remove-column.gif
|
||||
bin\res\table-remove-row-active.gif
|
||||
bin\res\table-remove-row-hover.gif
|
||||
bin\res\table-remove-row.gif
|
||||
|
||||
#ifdef MOZ_SVG
|
||||
; svg
|
||||
bin\res\svg.css
|
||||
bin\components\dom_svg.xpt
|
||||
#endif
|
||||
|
||||
; [Updater]
|
||||
bin\updater.exe
|
||||
|
||||
; [crash reporter]
|
||||
bin\crashreporter.exe
|
||||
bin\crashreporter.ini
|
После Ширина: | Высота: | Размер: 25 KiB |
После Ширина: | Высота: | Размер: 25 KiB |
После Ширина: | Высота: | Размер: 151 KiB |
|
@ -0,0 +1,52 @@
|
|||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Mozilla Browser code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2002
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
DEPTH = ../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
relativesrcdir = instantbird/locales
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
DEFINES += \
|
||||
-DAB_CD=$(AB_CD) \
|
||||
-DMOZ_APP_VERSION=$(APP_VERSION) \
|
||||
-DLOCALE_SRCDIR=$(LOCALE_SRCDIR)toto \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
<!ENTITY brandShortName "Instantbird">
|
||||
<!ENTITY brandFullName "Instantbird">
|
||||
<!ENTITY vendorShortName "Instantbird">
|
|
@ -0,0 +1,3 @@
|
|||
brandShortName=Instantbird
|
||||
brandFullName=Instantbird
|
||||
vendorShortName=Instantbird
|
|
@ -0,0 +1,9 @@
|
|||
<!ENTITY aboutDialog.title "About &brandFullName;">
|
||||
<!ENTITY credits.label "Credits">
|
||||
<!ENTITY credits.accesskey "C">
|
||||
<!ENTITY aboutLink.label "< About &brandFullName;">
|
||||
<!ENTITY aboutLink.accesskey "A">
|
||||
<!ENTITY aboutVersion "version">
|
||||
<!ENTITY geckoVersion "Gecko">
|
||||
<!ENTITY libpurpleVersion "libpurple">
|
||||
<!ENTITY copyrightText "©2007-2008 Contributors. This program is free software; you can redistribute it and/or modify it under the terms of the GNU GPL license version 2.0 or later.">
|
|
@ -0,0 +1,9 @@
|
|||
<!ENTITY accountWindow.title "Instantbird - account properties">
|
||||
<!ENTITY account.general "General">
|
||||
<!ENTITY account.advanced "Advanced Options">
|
||||
<!ENTITY account.name "Username:">
|
||||
<!ENTITY account.password "Password:">
|
||||
<!ENTITY account.rememberPassword "remember password">
|
||||
<!ENTITY account.alias "Alias:">
|
||||
<!ENTITY account.newMailNotification "Notify on new Mail">
|
||||
<!ENTITY account.autojoin "Auto-Joined Channels:">
|
|
@ -0,0 +1,30 @@
|
|||
<!ENTITY windowTitle.label "Account Wizard">
|
||||
|
||||
<!ENTITY accountWelcomeTitle.label "Welcome">
|
||||
<!ENTITY accountWelcomeInfo.label "This wizard will help you in the process of setting up your IM account in order to use it with Instantbird.">
|
||||
|
||||
<!ENTITY accountProtocolTitle.label "Protocol">
|
||||
<!ENTITY accountProtocolInfo.label "Please choose the protocol of your IM account in the following list.">
|
||||
<!ENTITY accountProtocolField.label "Protocol:">
|
||||
|
||||
<!ENTITY accountUsernameTitle.label "Username">
|
||||
<!ENTITY accountUsernameInfo.label "Please enter the username to use in order to connect your account.">
|
||||
<!ENTITY accountUsernameField.label "Username:">
|
||||
<!ENTITY accountUsernameJabberInfo.label "For Jabber username, please use the form login@server/location. For example instantbird@gmail.com/Instantbird.">
|
||||
<!ENTITY accountUsernameIrcInfo.label "For IRC username, please use the form nick@server. For example instantbird@irc.freenode.net.">
|
||||
|
||||
<!ENTITY accountPasswordTitle.label "Password">
|
||||
<!ENTITY accountPasswordInfo.label "Please enter your password in the box below.">
|
||||
<!ENTITY accountPasswordField.label "Password:">
|
||||
|
||||
<!ENTITY accountAliasTitle.label "Alias">
|
||||
<!ENTITY accountAliasInfo.label "You can now enter the local alias that you want to use for this accounts. This will only be displayed in your conversations when you talk. Remote users won't see it. You can leave this field blank and skip this step if you wish.">
|
||||
<!ENTITY accountAliasField.label "Alias:">
|
||||
|
||||
<!ENTITY accountAdvancedTitle.label "Advanced Options">
|
||||
<!ENTITY accountAdvancedInfo.label "You can now tweak some protocol specific options.">
|
||||
<!ENTITY accountAdvanced.newMailNotification.label "Notify on new Mail">
|
||||
|
||||
<!ENTITY accountSummaryTitle.label "Summary">
|
||||
<!ENTITY accountSummaryInfo.label "A summary of the information you entered is displayed below. Please check it before the account is created.">
|
||||
<!ENTITY accountSummary.connectNow.label "Connect this account now.">
|
|
@ -0,0 +1,20 @@
|
|||
<!ENTITY accountManager.title "Account manager - Instantbird">
|
||||
<!ENTITY accountManager.newAccount.label "New Account">
|
||||
<!ENTITY accountManager.newAccount.accesskey "N">
|
||||
<!ENTITY accountManager.close.label "Close">
|
||||
<!ENTITY accountManager.close.accesskey "C">
|
||||
<!ENTITY account.name "Name:">
|
||||
<!ENTITY account.alias "Alias:">
|
||||
<!ENTITY account.autoSignOn "Sign-on at startup">
|
||||
<!ENTITY account.connect.label "Connect">
|
||||
<!ENTITY account.connect.accesskey "o">
|
||||
<!ENTITY account.disconnect.label "Disconnect">
|
||||
<!ENTITY account.disconnect.accesskey "i">
|
||||
<!ENTITY account.delete.label "Delete">
|
||||
<!ENTITY account.delete.accesskey "D">
|
||||
<!ENTITY account.edit.label "Properties">
|
||||
<!ENTITY account.edit.accesskey "P">
|
||||
<!ENTITY account.connecting "Connecting...">
|
||||
<!ENTITY account.connected "Connected">
|
||||
<!ENTITY account.disconnecting "Disconnecting...">
|
||||
<!ENTITY account.disconnected "Not Connected">
|
|
@ -0,0 +1,8 @@
|
|||
account.connection.error=Error: %S
|
||||
account.connection.progress=Connecting: %S...
|
||||
account.connecting=Connecting...
|
||||
|
||||
requestAuthorizeTitle=Authorization request
|
||||
requestAuthorizeAllow=&Allow
|
||||
requestAuthorizeDeny=&Deny
|
||||
requestAuthorizeText=%S added you to his/her buddy list, do you want to allow him/her to see you?
|
|
@ -0,0 +1,4 @@
|
|||
<!ENTITY addBuddyWindow.title "Instantbird - add buddy">
|
||||
<!ENTITY name.label "Username">
|
||||
<!ENTITY account.label "Account">
|
||||
<!ENTITY tag.label "Group">
|
|
@ -0,0 +1,4 @@
|
|||
away.default.message=I am currently away from computer.
|
||||
away.prompt.title=Get Away
|
||||
away.prompt.message=Please enter below your away message.
|
||||
away.back.button=I'm back
|
|
@ -0,0 +1,13 @@
|
|||
<!ENTITY credit.title "&brandFullName; Credits">
|
||||
<!ENTITY brandMotto "'Cause witches can also type!">
|
||||
<!ENTITY credit.leads "Engineering Leads">
|
||||
<!ENTITY credit.thanks "Special Thanks To">
|
||||
|
||||
<!-- localization credits look like this: -->
|
||||
<!--
|
||||
<!ENTITY credit.translation
|
||||
"<h3>Translators</h3><ul><li>Name Here</li></ul>">
|
||||
-->
|
||||
<!ENTITY credit.translation "">
|
||||
|
||||
<!ENTITY credit.poweredByGecko "Powered by Gecko™ and libpurple">
|
|
@ -0,0 +1,18 @@
|
|||
<!ENTITY convWindow.title "Conversations - &brandShortName;">
|
||||
<!ENTITY blist.title "Buddy list - &brandShortName;">
|
||||
<!ENTITY file.menu "File">
|
||||
<!ENTITY file.accesskey "F">
|
||||
<!ENTITY addBuddy "Add Buddy">
|
||||
<!ENTITY joinChat "Join Chat">
|
||||
<!ENTITY getAway "Get Away">
|
||||
<!ENTITY tools.menu "Tools">
|
||||
<!ENTITY tools.accesskey "T">
|
||||
<!ENTITY accountManager "Accounts">
|
||||
<!ENTITY account.commandkey "a">
|
||||
<!ENTITY account.accesskey "A">
|
||||
<!ENTITY sounds "Sounds">
|
||||
<!ENTITY addonManager "Add-ons">
|
||||
<!ENTITY help.menu "?">
|
||||
<!ENTITY about.menu "About &brandShortName;">
|
||||
<!ENTITY about.accesskey "A">
|
||||
<!ENTITY conversation.contextMenu.close "Close Tab">
|