diff --git a/chatzilla.pkg b/chatzilla.pkg
deleted file mode 100644
--- a/chatzilla.pkg
+++ /dev/null
@@ -1,6 +0,0 @@
-[chatzilla]
-dist/bin/chrome/chatzilla.jar
-dist/bin/components/chatzilla-service.js
-
-[chatzilla-xpi]
-!preprocess xpiroot/install.js -E -Fsubstitution @topsrcdir@/xpinstall/packager/common/share.t @topsrcdir@/extensions/irc/install.jst
diff --git a/ff/jar.mn b/ff/jar.mn
--- a/ff/jar.mn
+++ b/ff/jar.mn
@@ -1,11 +1,8 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-# The registration of the overlays specific to Firefox below should match
-# the ../xul/content/ff/contents.rdf file.
chatzilla.jar:
% content chatzilla-ff %content/chatzilla/ff/
% overlay chrome://chatzilla/content/chatzilla.xul chrome://chatzilla/content/ff/overlay.xul application={ec8030f7-c20a-464f-9b0e-13a3a9e97384}
- content/chatzilla/ff/contents.rdf (../xul/content/ff/contents.rdf)
content/chatzilla/ff/overlay.xul (../xul/content/ff/overlay.xul)
diff --git a/jar.mn b/jar.mn
--- a/jar.mn
+++ b/jar.mn
@@ -14,18 +14,16 @@ chatzilla.jar:
% overlay chrome://browser/content/browser.xul chrome://chatzilla/content/browserOverlay.xul application={ec8030f7-c20a-464f-9b0e-13a3a9e97384}
% overlay chrome://browser/content/browser.xul chrome://chatzilla/content/browserOverlay.xul application={a463f10c-3994-11da-9945-000d60ca027b}
% overlay chrome://navigator/content/navigator.xul chrome://chatzilla/content/browserOverlay.xul application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}
% overlay chrome://editor/content/editorTasksOverlay.xul chrome://chatzilla/content/chatzillaOverlay.xul application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}
% overlay chrome://communicator/content/pref/preferences.xul chrome://chatzilla/content/prefsOverlay.xul application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}
% overlay chrome://communicator/content/pref/pref-appearance.xul chrome://chatzilla/content/prefsOverlay.xul application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}
% style chrome://browser/content/browser.xul chrome://chatzilla/skin/browserOverlay.css
% style chrome://global/content/customizeToolbar.xul chrome://chatzilla/skin/browserOverlay.css
-* content/chatzilla/contents.rdf (xul/content/contents.rdf)
- skin/modern/chatzilla/contents.rdf (xul/skin/contents.rdf)
content/chatzilla/lib/js/utils.js (js/lib/utils.js)
content/chatzilla/lib/js/events.js (js/lib/events.js)
content/chatzilla/lib/js/connection-xpcom.js (js/lib/connection-xpcom.js)
content/chatzilla/lib/js/command-manager.js (js/lib/command-manager.js)
content/chatzilla/lib/js/pref-manager.js (js/lib/pref-manager.js)
content/chatzilla/lib/js/message-manager.js (js/lib/message-manager.js)
content/chatzilla/lib/js/menu-manager.js (js/lib/menu-manager.js)
content/chatzilla/lib/js/ident.js (js/lib/ident.js)
diff --git a/js/lib/connection-xpcom.js b/js/lib/connection-xpcom.js
--- a/js/lib/connection-xpcom.js
+++ b/js/lib/connection-xpcom.js
@@ -4,16 +4,17 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const NS_ERROR_MODULE_NETWORK = 2152398848;
const NS_ERROR_UNKNOWN_HOST = NS_ERROR_MODULE_NETWORK + 30;
const NS_ERROR_CONNECTION_REFUSED = NS_ERROR_MODULE_NETWORK + 13;
const NS_ERROR_NET_TIMEOUT = NS_ERROR_MODULE_NETWORK + 14;
+const NS_ERROR_OFFLINE = NS_ERROR_MODULE_NETWORK + 16;
const NS_ERROR_NET_RESET = NS_ERROR_MODULE_NETWORK + 20;
const NS_ERROR_UNKNOWN_PROXY_HOST = NS_ERROR_MODULE_NETWORK + 42;
const NS_ERROR_PROXY_CONNECTION_REFUSED = NS_ERROR_MODULE_NETWORK + 72;
// Offline error constants:
const NS_ERROR_BINDING_ABORTED = NS_ERROR_MODULE_NETWORK + 2;
const NS_ERROR_ABORT = 0x80004004;
diff --git a/locale-jar.mn b/locale-jar.mn
--- a/locale-jar.mn
+++ b/locale-jar.mn
@@ -6,9 +6,8 @@ chatzilla-@LOCALE@.jar:
locale/@LOCALE@/chatzilla/chatzillaOverlay.dtd (xul/locale/@LOCALE@/chatzillaOverlay.dtd)
locale/@LOCALE@/chatzilla/browserOverlay.dtd (xul/locale/@LOCALE@/browserOverlay.dtd)
locale/@LOCALE@/chatzilla/pref-irc.dtd (xul/locale/@LOCALE@/pref-irc.dtd)
locale/@LOCALE@/chatzilla/chatzilla.dtd (xul/locale/@LOCALE@/chatzilla.dtd)
locale/@LOCALE@/chatzilla/chatzilla.properties (xul/locale/@LOCALE@/chatzilla.properties)
locale/@LOCALE@/chatzilla/config.dtd (xul/locale/@LOCALE@/config.dtd)
locale/@LOCALE@/chatzilla/channels.dtd (xul/locale/@LOCALE@/channels.dtd)
locale/@LOCALE@/chatzilla/ceip.dtd (xul/locale/@LOCALE@/ceip.dtd)
-* locale/@LOCALE@/chatzilla/contents.rdf (xul/locale/@LOCALE@/contents.rdf)
diff --git a/locales/Makefile.in b/locales/Makefile.in
--- a/locales/Makefile.in
+++ b/locales/Makefile.in
@@ -30,17 +30,17 @@ override AB_CD = en-US
endif
DEFINES += -DAB_CD=$(AB_CD)
ifneq (en-US,$(AB_CD))
XPI_NAME = chatzilla-$(AB_CD)
INSTALL_EXTENSION_ID = langpack-$(AB_CD)@chatzilla.mozilla.org
XPI_PKGNAME = chatzilla-$(CHATZILLA_VERSION).$(AB_CD)
-DIST_FILES = generic/install.rdf generic/install.js
+DIST_FILES = generic/install.rdf
XULPPFLAGS += \
-I$(call EXPAND_LOCALE_SRCDIR,toolkit/locales)/defines.inc \
-I$(LOCALE_SRCDIR)/defines.inc \
$(NULL)
endif
DEFINES += -DINSTALL_EXTENSION_ID="$(INSTALL_EXTENSION_ID)"
DEFINES += -DCHATZILLA_VERSION=$(CHATZILLA_VERSION)
diff --git a/locales/generic/chrome/contents.rdf b/locales/generic/chrome/contents.rdf
deleted file mode 100644
--- a/locales/generic/chrome/contents.rdf
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
-#filter substitution
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/locales/generic/install.rdf b/locales/generic/install.rdf
--- a/locales/generic/install.rdf
+++ b/locales/generic/install.rdf
@@ -15,25 +15,16 @@
em:creator="@MOZ_LANGPACK_CREATOR@"
em:homepageURL="@MOZ_LANGPACK_HOMEPAGE@">
#ifdef MOZ_LANGPACK_CONTRIBUTORS
@MOZ_LANGPACK_CONTRIBUTORS@
#endif
chrome://chatzilla/skin/images/logo.png
-
-
-
- {59c81df5-4b7a-477b-912d-4e0fdf64e5f2}
- @CHATZILLA_BASE_VERSION@
- @CHATZILLA_BASE_VERSION@.*
-
-
-
@@ -59,17 +50,11 @@
{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}
2.0
2.20a1
-
-
-
-
- locale/@AB_CD@/chatzilla/
-
-
+ true
diff --git a/locales/jar.mn b/locales/jar.mn
--- a/locales/jar.mn
+++ b/locales/jar.mn
@@ -2,17 +2,16 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#filter substitution
chatzilla.jar:
# the "% locale" line gets put into the .manifest used by toolkit-based apps
% locale chatzilla @AB_CD@ %locale/@AB_CD@/chatzilla/
-* locale/@AB_CD@/chatzilla/contents.rdf (generic/chrome/contents.rdf)
locale/@AB_CD@/chatzilla/chatzillaOverlay.dtd (%chrome/chatzillaOverlay.dtd)
locale/@AB_CD@/chatzilla/browserOverlay.dtd (%chrome/browserOverlay.dtd)
locale/@AB_CD@/chatzilla/pref-irc.dtd (%chrome/pref-irc.dtd)
locale/@AB_CD@/chatzilla/chatzilla.dtd (%chrome/chatzilla.dtd)
locale/@AB_CD@/chatzilla/chatzilla.properties (%chrome/chatzilla.properties)
locale/@AB_CD@/chatzilla/config.dtd (%chrome/config.dtd)
locale/@AB_CD@/chatzilla/ceip.dtd (%chrome/ceip.dtd)
locale/@AB_CD@/chatzilla/channels.dtd (%chrome/channels.dtd)
diff --git a/sm/jar.mn b/sm/jar.mn
--- a/sm/jar.mn
+++ b/sm/jar.mn
@@ -1,13 +1,10 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-# The registration of the overlays specific to SeaMonkey below should match
-# the ../xul/content/sm/contents.rdf file.
chatzilla.jar:
% content chatzilla-sm %content/chatzilla/sm/
% overlay chrome://chatzilla/content/chatzilla.xul chrome://chatzilla/content/sm/overlay.xul application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}
% overlay chrome://chatzilla/content/chatzilla.xul chrome://communicator/content/utilityOverlay.xul application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}
% overlay chrome://chatzilla/content/menus.xul chrome://communicator/content/tasksOverlay.xul application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}
- content/chatzilla/sm/contents.rdf (../xul/content/sm/contents.rdf)
content/chatzilla/sm/overlay.xul (../xul/content/sm/overlay.xul)
diff --git a/xpi/makexpi.py b/xpi/makexpi.py
--- a/xpi/makexpi.py
+++ b/xpi/makexpi.py
@@ -330,30 +330,23 @@ def do_build_base():
progress_mkdir(joinpath(xpiroot, 'chrome', 'icons', 'default'))
progress_mkdir(joinpath(xpiroot, 'components'))
print ' done'
progress_echo(' Checking JAR structure')
progress_mkdir(jarroot)
print ' done'
- progress_echo(' Updating Firefox Extension files')
+ progress_echo(' Updating extension files')
progress_preprocess(joinpath(xpifiles, 'install.rdf'), joinpath(xpiroot, 'install.rdf'), {'CHATZILLA_VERSION': version})
progress_copy(joinpath(xpifiles, 'chatzilla-window.ico'), joinpath(xpiroot, 'chrome', 'icons', 'default', 'chatzilla-window.ico'))
progress_copy(joinpath(xpifiles, 'chatzilla-window.xpm'), joinpath(xpiroot, 'chrome', 'icons', 'default', 'chatzilla-window.xpm'))
progress_copy(joinpath(xpifiles, 'chatzilla-window16.xpm'), joinpath(xpiroot, 'chrome', 'icons', 'default', 'chatzilla-window16.xpm'))
print ' done'
- progress_echo(' Updating Mozilla Extension files')
- progress_sed(joinpath(xpifiles, 'install.js'), joinpath(xpiroot, 'install.js'), ('@REVISION@', version))
- progress_move(joinpath(fedir, 'xul', 'content', 'contents.rdf'), joinpath(fedir, 'xul', 'content', 'contents.rdf.in'))
- progress_sed(joinpath(fedir, 'xul', 'content', 'contents.rdf.in'), joinpath(fedir, 'xul', 'content', 'contents.rdf'), (r'chrome:displayName="[^\"]+"', r'chrome:displayName="ChatZilla %s"' % version))
- progress_rm(joinpath(fedir, 'xul', 'content', 'contents.rdf.in'))
- print ' done'
-
progress_echo(' Constructing JAR package')
jm = progress_jarmaker()
progress_jarmaker_make(jm, joinpath(fedir, 'jar.mn'), fedir)
progress_jarmaker_make(jm, joinpath(fedir, 'sm', 'jar.mn'), joinpath(fedir, 'sm'))
progress_jarmaker_make(jm, joinpath(fedir, 'ff', 'jar.mn'), joinpath(fedir, 'ff'))
progress_preprocess(joinpath(localedir, 'jar.mn'), joinpath(localedir, 'jar.mn.pp'), {'AB_CD': 'en-US'})
# Define a preprocessor var for the next call to makeJar
jm.pp.context['AB_CD'] = 'en-US'
@@ -381,28 +374,22 @@ def do_build_locale():
progress_mkdir(xpiroot)
progress_mkdir(joinpath(xpiroot, 'chrome'))
print ' done'
progress_echo(' Checking JAR structure')
progress_mkdir(jarroot)
print ' done'
- progress_echo(' Updating Firefox Extension files')
+ progress_echo(' Updating extension files')
progress_preprocess([joinpath(localedir, locale, 'defines.inc'), joinpath(localedir, 'generic', 'install.rdf')], joinpath(xpiroot, 'install.rdf.pp'), {'CHATZILLA_VERSION': version, 'CHATZILLA_BASE_VERSION': version, 'AB_CD': locale, 'INSTALL_EXTENSION_ID': 'langpack-%s@chatzilla.mozilla.org' % locale, 'MOZ_LANG_TITLE': locale})
progress_sed(joinpath(xpiroot, 'install.rdf.pp'), joinpath(xpiroot, 'install.rdf'), ('chatzilla.jar', 'chatzilla-%s.jar' % locale))
progress_rm(joinpath(xpiroot, 'install.rdf.pp'))
print ' done'
- progress_echo(' Updating Mozilla Extension files')
- progress_preprocess([joinpath(localedir, locale, 'defines.inc'), joinpath(localedir, 'generic', 'install.js')], joinpath(xpiroot, 'install.js.pp'), {'CHATZILLA_VERSION': version, 'AB_CD': locale, 'MOZ_LANG_TITLE': locale})
- progress_sed(joinpath(xpiroot, 'install.js.pp'), joinpath(xpiroot, 'install.js'), ('chatzilla.jar', 'chatzilla-%s.jar' % locale))
- progress_rm(joinpath(xpiroot, 'install.js.pp'))
- print ' done'
-
progress_echo(' Constructing JAR package')
jm = progress_jarmaker()
progress_preprocess(joinpath(localedir, 'jar.mn'), joinpath(localedir, 'jar.mn.pp'), {'AB_CD': locale})
jm.pp.context['AB_CD'] = locale
progress_jarmaker_make(jm, joinpath(localedir, 'jar.mn.pp'), localedir, [joinpath(localedir, locale)])
progress_rm(joinpath(localedir, 'jar.mn.pp'))
progress_move(joinpath(jarroot, 'chatzilla.jar'), joinpath(jarroot, 'chatzilla-%s.jar' % locale))
print ' done'
diff --git a/xpi/resources/install.js b/xpi/resources/install.js
deleted file mode 100644
--- a/xpi/resources/install.js
+++ /dev/null
@@ -1,136 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-// this function verifies disk space in kilobytes
-function verifyDiskSpace(dirPath, spaceRequired)
-{
- var spaceAvailable;
-
- // Get the available disk space on the given path
- spaceAvailable = fileGetDiskSpaceAvailable(dirPath);
-
- // Convert the available disk space into kilobytes
- spaceAvailable = parseInt(spaceAvailable / 1024);
-
- // do the verification
- if(spaceAvailable < spaceRequired)
- {
- logComment("Insufficient disk space: " + dirPath);
- logComment(" required : " + spaceRequired + " K");
- logComment(" available: " + spaceAvailable + " K");
- return(false);
- }
-
- return(true);
-}
-
-// this function deletes a file if it exists
-function deleteThisFile(dirKey, file)
-{
- var fFileToDelete;
-
- fFileToDelete = getFolder(dirKey, file);
- logComment("File to delete: " + fFileToDelete);
- if(File.isFile(fFileToDelete))
- {
- File.remove(fFileToDelete);
- return(true);
- }
- else
- return(false);
-}
-
-// this function deletes a folder if it exists
-function deleteThisFolder(dirKey, folder, recursiveDelete)
-{
- var fToDelete;
-
- if(typeof recursiveDelete == "undefined")
- recursiveDelete = true;
-
- fToDelete = getFolder(dirKey, folder);
- logComment("folder to delete: " + fToDelete);
- if(File.isDirectory(fToDelete))
- {
- File.dirRemove(fToDelete, recursiveDelete);
- return(true);
- }
- else
- return(false);
-}
-
-// OS type detection
-// which platform?
-function getPlatform()
-{
- var platformStr;
- var platformNode;
-
- if('platform' in Install)
- {
- platformStr = new String(Install.platform);
-
- if (!platformStr.search(/^Macintosh/))
- platformNode = 'mac';
- else if (!platformStr.search(/^Win/))
- platformNode = 'win';
- else if (!platformStr.search(/^OS\/2/))
- platformNode = 'win';
- else
- platformNode = 'unix';
- }
- else
- {
- var fOSMac = getFolder("Mac System");
- var fOSWin = getFolder("Win System");
-
- logComment("fOSMac: " + fOSMac);
- logComment("fOSWin: " + fOSWin);
-
- if(fOSMac != null)
- platformNode = 'mac';
- else if(fOSWin != null)
- platformNode = 'win';
- else
- platformNode = 'unix';
- }
-
- return platformNode;
-}
-
-var srDest = 665;
-
-var err = initInstall("ChatZilla @REVISION@", "ChatZilla", "@REVISION@");
-logComment("initInstall: " + err);
-
-if (verifyDiskSpace(getFolder("Program"), srDest))
-{
- addFile("ChatZilla service",
- "@REVISION@",
- "components/chatzilla-service.js",
- getFolder("Components"),
- "chatzilla-service.js",
- true);
-
- addFile("ChatZilla Chrome",
- "chrome/chatzilla.jar", // jar source folder
- getFolder("Chrome"), // target folder
- ""); // target subdir
-
- addFile("ChatZilla Win32 icon", "chrome/icons/default/chatzilla-window.ico", getFolder("Chrome"), "icons/default/chatzilla-window.ico");
- addFile("ChatZilla Unix 32 icon", "chrome/icons/default/chatzilla-window.xpm", getFolder("Chrome"), "icons/default/chatzilla-window.xpm");
- addFile("ChatZilla Unix 16 icon", "chrome/icons/default/chatzilla-window16.xpm", getFolder("Chrome"), "icons/default/chatzilla-window16.xpm");
-
- registerChrome(PACKAGE | DELAYED_CHROME, getFolder("Chrome","chatzilla.jar"), "content/chatzilla/");
- registerChrome(PACKAGE | DELAYED_CHROME, getFolder("Chrome","chatzilla.jar"), "content/chatzilla/sm/");
- registerChrome(SKIN | DELAYED_CHROME, getFolder("Chrome","chatzilla.jar"), "skin/modern/chatzilla/");
- registerChrome(LOCALE | DELAYED_CHROME, getFolder("Chrome","chatzilla.jar"), "locale/en-US/chatzilla/");
-
- if (err==SUCCESS)
- performInstall();
- else
- cancelInstall(err);
-}
-else
- cancelInstall(INSUFFICIENT_DISK_SPACE);
diff --git a/xpi/resources/install.rdf b/xpi/resources/install.rdf
--- a/xpi/resources/install.rdf
+++ b/xpi/resources/install.rdf
@@ -6,16 +6,17 @@
#filter substitution
{59c81df5-4b7a-477b-912d-4e0fdf64e5f2}
@CHATZILLA_VERSION@
+ 2
@@ -58,23 +59,13 @@
James Ross
Samuel Sieb
chrome://chatzilla/skin/images/logo.png
http://chatzilla.hacksrus.com/
chrome://chatzilla/content/about/about.xul
chrome://chatzilla/content/config.xul
true
-
-
-
- content/chatzilla/
- content/chatzilla/ff/
- locale/en-US/chatzilla/
- skin/modern/chatzilla/
-
-
-
true
diff --git a/xul/content/contents.rdf b/xul/content/contents.rdf
deleted file mode 100644
--- a/xul/content/contents.rdf
+++ /dev/null
@@ -1,50 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- chrome://chatzilla/content/browserOverlay.xul
-
-
-
- chrome://chatzilla/content/chatzillaOverlay.xul
-
-
-
- chrome://chatzilla/content/prefsOverlay.xul
-
-
-
- chrome://chatzilla/content/prefsOverlay.xul
-
-
-
diff --git a/xul/content/ff/contents.rdf b/xul/content/ff/contents.rdf
deleted file mode 100644
--- a/xul/content/ff/contents.rdf
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- chrome://chatzilla/content/ff/overlay.xul
-
-
-
diff --git a/xul/content/handlers.js b/xul/content/handlers.js
--- a/xul/content/handlers.js
+++ b/xul/content/handlers.js
@@ -2115,16 +2115,21 @@ function my_netdisconnect (e)
msg = getMsg(MSG_UNKNOWN_PROXY_HOST,
[this.getURL(), e.server.getURL()]);
break;
case NS_ERROR_PROXY_CONNECTION_REFUSED:
msg = MSG_PROXY_CONNECTION_REFUSED;
break;
+ case NS_ERROR_OFFLINE:
+ msg = MSG_ERR_OFFLINE;
+ retrying = false;
+ break;
+
case NS_ERROR_ABORT:
if (client.iosvc.offline)
{
msg = getMsg(MSG_CONNECTION_ABORT_OFFLINE,
[this.getURL(), e.server.getURL()]);
}
else
{
diff --git a/xul/content/sm/contents.rdf b/xul/content/sm/contents.rdf
deleted file mode 100644
--- a/xul/content/sm/contents.rdf
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- chrome://chatzilla/content/sm/overlay.xul
- chrome://communicator/content/utilityOverlay.xul
-
-
-
- chrome://communicator/content/tasksOverlay.xul
-
-
-
diff --git a/xul/content/static.js b/xul/content/static.js
--- a/xul/content/static.js
+++ b/xul/content/static.js
@@ -156,18 +156,16 @@ function init()
importFromFrame("updateUsers");
importFromFrame("removeUsers");
processStartupScripts();
client.commandManager.installKeys(document);
createMenus();
- initIcons();
-
client.busy = false;
updateProgress();
initOfflineIcon();
updateAlertIcon();
client.isIdleAway = false;
initIdleAutoAway(client.prefs["awayIdleTime"]);
client.initialized = true;
@@ -490,19 +488,16 @@ function getVersionInfo()
function initApplicationCompatibility()
{
// This function does nothing more than tweak the UI based on the host
// application.
// Set up simple host and platform information.
client.host = "Unknown";
- // Do we need to copy the icons? (not necessary on Gecko 1.8 and onwards,
- // and install.js does it for us on SeaMonkey)
- client.hostCompat.needToCopyIcons = false;
var app = getService("@mozilla.org/xre/app-info;1", "nsIXULAppInfo");
// nsIXULAppInfo wasn't implemented before 1.8...
if (app)
{
// Use the XULAppInfo.ID to find out what host we run on.
switch (app.ID)
{
@@ -522,33 +517,19 @@ function initApplicationCompatibility()
case "{3db10fab-e461-4c80-8b97-957ad5f8ea47}": // Netscape
client.host = "Netscape";
break;
default:
client.unknownUID = app.ID;
client.host = ""; // Unknown host, show an error later.
}
}
- else if ("getBrowserURL" in window)
- {
- var url = getBrowserURL();
- if (url == "chrome://navigator/content/navigator.xul")
- {
- client.host = "Mozilla";
- }
- else if (url == "chrome://browser/content/browser.xul")
- {
- client.hostCompat.needToCopyIcons = true;
- client.host = "Firefox";
- }
else
{
client.host = ""; // We don't know this host. Show an error later.
- client.unknownUID = url;
- }
}
client.platform = "Unknown";
if (navigator.platform.search(/mac/i) > -1)
client.platform = "Mac";
if (navigator.platform.search(/win/i) > -1)
client.platform = "Windows";
if (navigator.platform.search(/linux/i) > -1)
@@ -564,68 +545,16 @@ function initApplicationCompatibility()
// Windows likes \r\n line endings, as wussy-notepad can't cope with just
// \n logs.
if (client.platform == "Windows")
client.lineEnd = "\r\n";
else
client.lineEnd = "\n";
}
-function initIcons()
-{
- // Make sure we got the ChatZilla icon(s) in place first.
- const iconName = "chatzilla-window";
- const suffixes = [".ico", ".xpm", "16.xpm"];
-
- /* when installing on Mozilla, the XPI has the power to put the icons where
- * they are needed - in older versions of Firefox, it doesn't.
- */
- if (!client.hostCompat.needToCopyIcons)
- return;
-
- var sourceDir = getSpecialDirectory("ProfD");
- sourceDir.append("extensions");
- sourceDir.append("{" + __cz_guid + "}");
- sourceDir.append("chrome");
- sourceDir.append("icons");
- sourceDir.append("default");
-
- var destDir = getSpecialDirectory("AChrom");
- destDir.append("icons");
- destDir.append("default");
- if (!destDir.exists())
- {
- try
- {
- mkdir(destDir);
- }
- catch(ex)
- {
- return;
- }
- }
-
- for (var i = 0; i < suffixes.length; i++)
- {
- var iconDest = destDir.clone();
- iconDest.append(iconName + suffixes[i]);
- var iconSrc = sourceDir.clone();
- iconSrc.append(iconName + suffixes[i]);
-
- if (iconSrc.exists() && !iconDest.exists())
- {
- try
- {
- iconSrc.copyTo(iconDest.parent, iconDest.leafName);
- }
- catch(ex){}
- }
- }
-}
-
function initInstrumentation()
{
/* Make sure we assign the user a random key - this is not used for
* anything except percentage chance of participation. The value is
* 1 through 10000, inclusive. 0 indicates unset.
*/
if (client.prefs["instrumentation.key"] == 0)
{
diff --git a/xul/skin/contents.rdf b/xul/skin/contents.rdf
deleted file mode 100644
--- a/xul/skin/contents.rdf
+++ /dev/null
@@ -1,38 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- chrome://chatzilla/skin/browserOverlay.css
-
-
-
- chrome://chatzilla/skin/browserOverlay.css
-
-