Index: extensions/irc/xpi/.cvsignore =================================================================== RCS file: /cvsroot/mozilla/extensions/irc/xpi/.cvsignore,v retrieving revision 1.2 diff -u -8 -p -r1.2 .cvsignore --- extensions/irc/xpi/.cvsignore 31 Jan 2006 17:41:50 -0000 1.2 +++ extensions/irc/xpi/.cvsignore 26 Jun 2006 15:07:08 -0000 @@ -1,4 +1,5 @@ jar-tree xpi-tree +xr-tree xpi-tree-* -chatzilla-*.xpi +chatzilla-* Index: extensions/irc/xpi/makexpi.sh =================================================================== RCS file: /cvsroot/mozilla/extensions/irc/xpi/makexpi.sh,v retrieving revision 1.7 diff -u -8 -p -r1.7 makexpi.sh --- extensions/irc/xpi/makexpi.sh 25 Feb 2006 18:45:43 -0000 1.7 +++ extensions/irc/xpi/makexpi.sh 26 Jun 2006 15:07:08 -0000 @@ -1,16 +1,17 @@ #!/bin/sh # Set up paths for finding files. if [ -z "$FEDIR" ]; then FEDIR=$PWD/..; fi if [ -z "$CONFIGDIR" ]; then CONFIGDIR=$FEDIR/../../config; fi if [ -z "$XPIFILES" ]; then XPIFILES=$PWD/resources; fi if [ -z "$XPIROOT" ]; then XPIROOT=$PWD/xpi-tree; fi if [ -z "$JARROOT" ]; then JARROOT=$PWD/jar-tree; fi +if [ -z "$XRROOT" ]; then XRROOT=$PWD/xr-tree; fi if [ -z "$PERL" ]; then PERL=perl; fi if [ -z "$DEBUG" ]; then DEBUG=0; fi function showParams() { I=0 for P in "$@"; do @@ -92,16 +93,18 @@ function safeCommand() ## Begin real program ## if [ "$1" = "clean" ]; then echo -n "Cleaning up files" echo -n . rm -rf "$XPIROOT" echo -n . + rm -rf "$XRROOT" + echo -n . rm -rf "$JARROOT" echo ". done." exit fi # Check setup. @@ -112,105 +115,180 @@ fi if ! [ -d "$CONFIGDIR" ]; then echo "ERROR: mozilla/config directory (CONFIGDIR) not found." exit 1 fi # Extract version number. VERSION=`grep "const __cz_version" "$FEDIR/xul/content/static.js" | sed "s|.*\"\([^\"]\{1,\}\)\".*|\1|"` +BUILDID=`date +%Y%m%d%H` if [ -z "$VERSION" ]; then echo "ERROR: Unable to get version number." exit 1 fi echo Beginning build of ChatZilla $VERSION... # Check for existing. if [ -r "chatzilla-$VERSION.xpi" ]; then echo " WARNING: output XPI will be overwritten." fi # Check for required directory layouts. +echo -n " Checking XULRunner structure" +echo -n . +if ! [ -d xr-tree ]; then mkdir xr-tree; fi +echo -n . +if ! [ -d xr-tree/chrome ]; then mkdir xr-tree/chrome; fi +echo -n . +if ! [ -d xr-tree/chrome/branding ]; then mkdir xr-tree/chrome/branding; fi +echo -n . +if ! [ -d xr-tree/chrome/icons ]; then mkdir xr-tree/chrome/icons; fi +echo -n . +if ! [ -d xr-tree/chrome/icons/default ]; then mkdir xr-tree/chrome/icons/default; fi +echo -n . +if ! [ -d xr-tree/components ]; then mkdir xr-tree/components; fi +echo -n . +if ! [ -d xr-tree/defaults ]; then mkdir xr-tree/defaults; fi +if ! [ -d xr-tree/defaults/preferences ]; then mkdir xr-tree/defaults/preferences; fi +echo -n . +if ! [ -d xr-tree/extensions ]; then mkdir xr-tree/extensions; fi +if ! [ -d xr-tree/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd} ]; then mkdir xr-tree/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}; fi +echo ". done" + echo -n " Checking XPI structure" echo -n . if ! [ -d xpi-tree ]; then mkdir xpi-tree; fi echo -n . if ! [ -d xpi-tree/chrome ]; then mkdir xpi-tree/chrome; fi echo -n . if ! [ -d xpi-tree/components ]; then mkdir xpi-tree/components; fi echo -n . if ! [ -d xpi-tree/defaults ]; then mkdir xpi-tree/defaults; fi -echo ". done" +echo ". done" echo -n " Checking JAR structure" echo -n . if ! [ -d jar-tree ]; then mkdir jar-tree; fi -echo ". done" +echo ". done" # Make Firefox updates. echo -n " Updating Firefox Extension files" echo -n . safeCommand sed "s|@REVISION@|$VERSION|g" '<' "$XPIFILES/install.rdf" '>' "$XPIROOT/install.rdf" echo -n . safeCommand cp "$XPIFILES/chatzilla-window.ico" "$XPIROOT/defaults/chatzilla-window.ico" echo -n . safeCommand cp "$XPIFILES/chatzilla-window.xpm" "$XPIROOT/defaults/chatzilla-window.xpm" echo -n . safeCommand cp "$XPIFILES/chatzilla-window16.xpm" "$XPIROOT/defaults/chatzilla-window16.xpm" -echo ". done" +echo ". done" # Make Mozilla Suite updates. echo -n " Updating Mozilla Extension files" echo -n . safeCommand sed "s|@REVISION@|$VERSION|g" '<' "$XPIFILES/install.js" '>' "$XPIROOT/install.js" echo -n . safeCommand mv "$FEDIR/xul/content/contents.rdf" "$FEDIR/xul/content/contents.rdf.in" safeCommand sed "s|@MOZILLA_VERSION@|cz-$VERSION|g;s|\(chrome:displayName=\)\"[^\"]\{1,\}\"|\1\"ChatZilla $VERSION\"|g" '<' "$FEDIR/xul/content/contents.rdf.in" '>' "$FEDIR/xul/content/contents.rdf" safeCommand rm "$FEDIR/xul/content/contents.rdf.in" echo -n . safeCommand mv "$FEDIR/xul/locale/en-US/contents.rdf" "$FEDIR/xul/locale/en-US/contents.rdf.in" safeCommand sed "s|@MOZILLA_VERSION@|cz-$VERSION|g" '<' "$FEDIR/xul/locale/en-US/contents.rdf.in" '>' "$FEDIR/xul/locale/en-US/contents.rdf" safeCommand rm "$FEDIR/xul/locale/en-US/contents.rdf.in" -echo ". done" +echo ". done" # Create JAR. echo -n " Constructing JAR package" echo -n . OLDPWD=`pwd` cd "$CONFIGDIR" echo -n . safeCommand $PERL make-jars.pl -v -z zip -p preprocessor.pl -s "$FEDIR" -d "$JARROOT" '<' "$FEDIR/jar.mn" echo -n . safeCommand $PERL make-jars.pl -v -z zip -p preprocessor.pl -s "$FEDIR/sm" -d "$JARROOT" '<' "$FEDIR/sm/jar.mn" echo -n . safeCommand $PERL make-jars.pl -v -z zip -p preprocessor.pl -s "$FEDIR/ff" -d "$JARROOT" '<' "$FEDIR/ff/jar.mn" echo -n . +safeCommand $PERL make-jars.pl -v -z zip -p preprocessor.pl -s "$FEDIR/xr" -d "$JARROOT" '<' "$FEDIR/xr/jar.mn" +echo -n . cd "$OLDPWD" -echo ". done" +echo ". done" +# Make XULRunner package +echo -n " Constructing XULRunner app" +echo -n . +safeCommand cp -v "$JARROOT/chatzilla.jar" "$XRROOT/chrome/" +safeCommand chmod 664 "$XRROOT/chrome/chatzilla.jar" +echo -n . +safeCommand cp -v "$FEDIR/js/lib/chatzilla-service.js" "$XRROOT/components/" +safeCommand chmod 664 "$XRROOT/components/chatzilla-service.js" +echo -n . +safeCommand sed "s|@REVISION@|$VERSION|g" '<' "$XPIFILES/chatzilla-prefs.xr.js" '>' "$XRROOT/defaults/preferences/chatzilla-prefs.xr.js" +if [ $UPDATE_CHANNEL ]; then + safeCommand cp "$XPIFILES/update-prefs.xr.js" "$XRROOT/defaults/preferences/" + safeCommand echo "pref(\"app.update.channel\", \"$UPDATE_CHANNEL\");" '>' "$XRROOT/defaults/preferences/channel-prefs.js" +fi +safeCommand sed "s|@REVISION@|$VERSION|g" '<' "$XPIFILES/themeinstall.rdf" '>' "$XRROOT/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/install.rdf" +echo -n . +safeCommand sed "s|@REVISION@|$VERSION|g" '<' "$XPIFILES/brand.dtd" '>' "$XRROOT/chrome/branding/brand.dtd" +safeCommand sed "s|@REVISION@|$VERSION|g" '<' "$XPIFILES/brand.properties" '>' "$XRROOT/chrome/branding/brand.properties" +echo -n . +safeCommand sed "s|@REVISION@|$VERSION|g" '<' "$XPIFILES/application.ini" '>' "$XRROOT/application.ini.tmp" +safeCommand sed "s|@BUILDID@|$BUILDID|g" '<' "$XRROOT/application.ini.tmp" '>' "$XRROOT/application.ini" +safeCommand rm "$XRROOT/application.ini.tmp" +echo -n . +safeCommand cp "$XPIFILES/chatzilla-window.ico" "$XRROOT/chrome/icons/default/chatzilla-window.ico" +safeCommand cp "$XPIFILES/chatzilla-window.xpm" "$XRROOT/chrome/icons/default/chatzilla-window.xpm" +safeCommand cp "$XPIFILES/chatzilla-window16.xpm" "$XRROOT/chrome/icons/default/chatzilla-window16.xpm" +echo -n . +safeCommand cp "$XPIFILES/chrome.xr.manifest" "$XRROOT/chrome/chrome.manifest" +echo ". done" + +echo -n " Packaging XULRunner app" +echo -n . +OLDPWD=`pwd` +cd "$XRROOT" +safeCommand zip -9vr ../chatzilla-$VERSION-$BUILDID-xr.zip . -i "*" -x "log*" +cd "$OLDPWD" +echo -n . +if [ $UPDATE_CHANNEL ]; then + safeCommand ../../../tools/update-packaging/make_full_update.sh chatzilla-$VERSION-$BUILDID.mar xr-tree + echo -n ..... + UPDATA="chatzilla-$VERSION-$BUILDID.txt" + echo "version : $VERSION" > $UPDATA + echo "buildid : $BUILDID" >> $UPDATA + echo "zip-url : download/chatzilla-$VERSION-$BUILDID-xr.zip" >> $UPDATA + echo "zip-size : "`stat --printf=%s chatzilla-$VERSION-$BUILDID-xr.zip` >> $UPDATA + echo "mar-url : update/chatzilla-$VERSION-$BUILDID.mar" >> $UPDATA + echo "mar-size : "`stat --printf=%s chatzilla-$VERSION-$BUILDID.mar` >> $UPDATA + echo "mar-sha1 : "`sha1sum chatzilla-$VERSION-$BUILDID.mar | head -c 40` >> $UPDATA + echo "channels : " >> $UPDATA +fi +echo ". done" # Make XPI. echo -n " Constructing XPI package" echo -n . safeCommand cp -v "$JARROOT/chatzilla.jar" "$XPIROOT/chrome/" echo -n . safeCommand cp -v "$FEDIR/js/lib/chatzilla-service.js" "$XPIROOT/components/" echo -n . safeCommand chmod 664 "$XPIROOT/chrome/chatzilla.jar" echo -n . safeCommand chmod 664 "$XPIROOT/components/chatzilla-service.js" echo -n . OLDPWD=`pwd` cd "$XPIROOT" -safeCommand zip -vr ../chatzilla-$VERSION.xpi . -i "*" -x "log*" +safeCommand zip -9vr ../chatzilla-$VERSION.xpi . -i "*" -x "log*" cd "$OLDPWD" -echo ". done" +echo ". done" echo "Build of ChatZilla $VERSION... ALL DONE" Index: extensions/irc/xpi/resources/application.ini =================================================================== RCS file: extensions/irc/xpi/resources/application.ini diff -N extensions/irc/xpi/resources/application.ini --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ extensions/irc/xpi/resources/application.ini 26 Jun 2006 15:07:08 -0000 @@ -0,0 +1,12 @@ +[App] +Name=ChatZilla +Version=@REVISION@ +BuildID=@BUILDID@ +ID={59c81df5-4b7a-477b-912d-4e0fdf64e5f2} + +[Gecko] +MinVersion=1.8 +MaxVersion=1.9 + +[XRE] +EnableExtensionManager=true Index: extensions/irc/xpi/resources/brand.dtd =================================================================== RCS file: extensions/irc/xpi/resources/brand.dtd diff -N extensions/irc/xpi/resources/brand.dtd --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ extensions/irc/xpi/resources/brand.dtd 26 Jun 2006 15:07:08 -0000 @@ -0,0 +1,4 @@ + + + + Index: extensions/irc/xpi/resources/brand.properties =================================================================== RCS file: extensions/irc/xpi/resources/brand.properties diff -N extensions/irc/xpi/resources/brand.properties --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ extensions/irc/xpi/resources/brand.properties 26 Jun 2006 15:07:08 -0000 @@ -0,0 +1,3 @@ +brandShortName=ChatZilla +brandFullName=ChatZilla @REVISION@ +vendorShortName= Index: extensions/irc/xpi/resources/chatzilla-prefs.xr.js =================================================================== RCS file: extensions/irc/xpi/resources/chatzilla-prefs.xr.js diff -N extensions/irc/xpi/resources/chatzilla-prefs.xr.js --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ extensions/irc/xpi/resources/chatzilla-prefs.xr.js 26 Jun 2006 15:07:09 -0000 @@ -0,0 +1,33 @@ +// ChatZilla for XULRunner +// Default Prefs + +// This is needed to start ChatZilla. +pref("toolkit.defaultChromeURI", "chrome://chatzilla/content/chatzilla.xul"); + +// Enable the extension manager... +pref("xpinstall.dialog.confirm", "chrome://mozapps/content/xpinstall/xpinstallConfirm.xul"); +pref("xpinstall.dialog.progress.skin", "chrome://mozapps/content/extensions/extensions.xul?type=themes"); +pref("xpinstall.dialog.progress.chrome", "chrome://mozapps/content/extensions/extensions.xul?type=extensions"); +pref("xpinstall.dialog.progress.type.skin", "Extension:Manager-themes"); +pref("xpinstall.dialog.progress.type.chrome", "Extension:Manager-extensions"); +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"); + +// This means nothing because a.m.o doesn't host ChatZilla extensions, +// but I have to put something or the extension manager pukes. +pref("extensions.update.url", "chrome://mozapps/locale/extensions/extensions.properties"); +pref("extensions.getMoreExtensionsURL", "chrome://mozapps/locale/extensions/extensions.properties"); +pref("extensions.getMoreThemesURL", "chrome://mozapps/locale/extensions/extensions.properties"); + +// make the external protocol service happy +pref("network.protocol-handler.expose-all", false); +pref("network.protocol-handler.expose.irc", true); +pref("network.protocol-handler.expose.ircs", true); +pref("security.dialog_enable_delay", 0); + +pref("general.useragent.extra.chatzilla", "ChatZilla/@REVISION@"); Index: extensions/irc/xpi/resources/chrome.xr.manifest =================================================================== RCS file: extensions/irc/xpi/resources/chrome.xr.manifest diff -N extensions/irc/xpi/resources/chrome.xr.manifest --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ extensions/irc/xpi/resources/chrome.xr.manifest 26 Jun 2006 15:07:09 -0000 @@ -0,0 +1,5 @@ +content chatzilla jar:chatzilla.jar!/content/chatzilla/ xpcnativewrappers=yes +overlay chrome://chatzilla/content/chatzilla.xul chrome://chatzilla/content/xr/overlay.xul +skin chatzilla classic/1.0 jar:chatzilla.jar!/skin/modern/chatzilla/ +locale chatzilla en-US jar:chatzilla.jar!/locale/en-US/chatzilla/ +locale branding en-US branding/ Index: extensions/irc/xpi/resources/themeinstall.rdf =================================================================== RCS file: extensions/irc/xpi/resources/themeinstall.rdf diff -N extensions/irc/xpi/resources/themeinstall.rdf --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ extensions/irc/xpi/resources/themeinstall.rdf 26 Jun 2006 15:07:09 -0000 @@ -0,0 +1,22 @@ + + + + {972ce4c6-7e08-4474-a285-3208198ce6fd} + 1 + ChatZilla + + + {59c81df5-4b7a-477b-912d-4e0fdf64e5f2} + 0 + * + + + The Default Theme + ChatZilla Contributors + classic/1.0 + true + true + + + + Index: extensions/irc/xpi/resources/update-prefs.xr.js =================================================================== RCS file: extensions/irc/xpi/resources/update-prefs.xr.js diff -N extensions/irc/xpi/resources/update-prefs.xr.js --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ extensions/irc/xpi/resources/update-prefs.xr.js 26 Jun 2006 15:07:09 -0000 @@ -0,0 +1,20 @@ +// Always prompt by default. +pref("app.update.enabled", true); +pref("app.update.auto", false); +pref("app.update.silent", false); +pref("app.update.mode", 0); +pref("app.update.incompatible.mode", 0); + +pref("app.update.url", "http://chatzilla.rdmsoft.com/xulrunner/update/1/%CHANNEL%?v=%VERSION%&b=%BUILD_ID%&o=%BUILD_TARGET%"); +pref("app.update.url.manual", "http://chatzilla.rdmsoft.com/xulrunner/"); +pref("app.update.url.details", "http://chatzilla.rdmsoft.com/xulrunner/"); + +// Check every day, if download is refused ask again each day. +// If download accepted but install refused, nag after 3 hours. +pref("app.update.interval", 86400); +pref("app.update.nagTimer.download", 86400); +pref("app.update.nagTimer.restart", 7200); +pref("app.update.timer", 600000); + +// Seems to be broken, and nothing in-tree uses it. +pref("app.update.showInstalledUI", false); Index: extensions/irc/xr/Makefile.in =================================================================== RCS file: extensions/irc/xr/Makefile.in diff -N extensions/irc/xr/Makefile.in --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ extensions/irc/xr/Makefile.in 26 Jun 2006 15:07:09 -0000 @@ -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 ChatZilla. +# +# The Initial Developer of the Original Code is James Ross. +# Portions created by the Initial Developer are Copyright (C) 2004 +# the Initial Developer. All Rights Reserved. +# +# Contributor(s): +# James Ross, silver@warwickcompsoc.co.uk, initial version. +# +# 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 Index: extensions/irc/xr/jar.mn =================================================================== RCS file: extensions/irc/xr/jar.mn diff -N extensions/irc/xr/jar.mn --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ extensions/irc/xr/jar.mn 26 Jun 2006 15:07:09 -0000 @@ -0,0 +1,2 @@ +chatzilla.jar: + content/chatzilla/xr/overlay.xul (../xul/content/xr/overlay.xul) Index: extensions/irc/xul/content/commands.js =================================================================== RCS file: /cvsroot/mozilla/extensions/irc/xul/content/commands.js,v retrieving revision 1.104 diff -u -8 -p -r1.104 commands.js --- extensions/irc/xul/content/commands.js 17 Jun 2006 21:10:47 -0000 1.104 +++ extensions/irc/xul/content/commands.js 26 Jun 2006 15:07:13 -0000 @@ -240,16 +240,23 @@ function initCommands() ["motif-light", "motif light", 0], ["motif-default", "motif default", 0], ["sync-output", "eval syncOutputFrame(this)", 0], ["userlist", "toggle-ui userlist", CMD_CONSOLE], ["tabstrip", "toggle-ui tabstrip", CMD_CONSOLE], ["statusbar", "toggle-ui status", CMD_CONSOLE], ["header", "toggle-ui header", CMD_CONSOLE], + ["extension-manager", "add-ons extensions", 0], + ["theme-manager", "add-ons themes", 0], + ["add-ons", cmdAddons, 0], + ["jsconsole", cmdJSConsole, 0], + ["about-config", cmdAboutConfig, 0], + ["update", cmdUpdate, 0], + // text-direction aliases ["rtl", "text-direction rtl", CMD_CONSOLE], ["ltr", "text-direction ltr", CMD_CONSOLE], ["toggle-text-dir", "text-direction toggle", 0], ["irtl", "input-text-direction rtl", CMD_CONSOLE], ["iltr", "input-text-direction ltr", CMD_CONSOLE], // Instrumentation aliases ["allow-inst1", "pref instrumentation.inst1 1", 0], @@ -4225,8 +4232,64 @@ function cmdURLs(e) for (var i = 0; i < num; i++) display(getMsg(MSG_URLS_ITEM, [i + 1, oldList[i]])); // Restore old URL list so displaying it has no effect. client.prefs["urls.list"] = oldList; } } + +function cmdAddons(e) +{ + var winType = "Extension:Manager"; + var url = "chrome://mozapps/content/extensions/extensions.xul" + + if(!e.type && !client.hostCompat.addonManager) + e.type = "extensions"; + + if (e.type) + { + winType += "-" + e.type; + url += "?type=" + e.type; + } + + toOpenWindowByType(winType, url); +} + +function toOpenWindowByType(inType, url, features) +{ + var wm = getService("@mozilla.org/appshell/window-mediator;1", + "nsIWindowMediator"); + var topWindow = wm.getMostRecentWindow(inType); + + if(typeof features == "undefined") + features = "chrome,extrachrome,menubar,resizable," + + "scrollbars,status,toolbar"; + + if (topWindow) + topWindow.focus(); + else + window.open(url, "_blank", features); +} + +function cmdJSConsole(e) +{ + toOpenWindowByType("global:console", "chrome://global/content/console.xul"); +} + +function cmdAboutConfig(e) +{ + openDialog("chrome://global/content/config.xul"); +} + +function cmdUpdate(e) +{ + var um = getService("@mozilla.org/updates/update-manager;1", + "nsIUpdateManager"); + var prompter = newObject("@mozilla.org/updates/update-prompt;1", + "nsIUpdatePrompt"); + + if (um.activeUpdate && um.activeUpdate.state == "pending") + prompter.showUpdateDownloaded(um.activeUpdate); + else + prompter.checkForUpdates(); +} Index: extensions/irc/xul/content/menus.js =================================================================== RCS file: /cvsroot/mozilla/extensions/irc/xul/content/menus.js,v retrieving revision 1.23 diff -u -8 -p -r1.23 menus.js --- extensions/irc/xul/content/menus.js 4 Mar 2006 23:11:40 -0000 1.23 +++ extensions/irc/xul/content/menus.js 26 Jun 2006 15:07:14 -0000 @@ -133,24 +133,32 @@ function initMenus() var ViewUser = "(cx.TYPE == 'IRCUser')"; // IRC specific combinations var ChannelActive = "(" + ViewChannel + " and cx.channel.active)"; var ChannelInactive = "(" + ViewChannel + " and !cx.channel.active)"; var NetConnected = "(cx.network and cx.network.isConnected())"; var NetDisconnected = "(cx.network and !cx.network.isConnected())"; + var addons = "client.hostCompat.addonManager"; + client.menuSpecs["mainmenu:chatzilla"] = { label: MSG_MNU_CHATZILLA, getContext: getDefaultContext, items: [ ["cmd-prefs", {id: "menu_preferences"}], ["print"], ["save"], + ["-", {visibleif: XULRunner}], + ["extension-manager", {visibleif: XULRunner + " && !" + addons}], + ["theme-manager", {visibleif: XULRunner + " && !" + addons}], + ["add-ons", {visibleif: XULRunner + " && " + addons}], + ["jsconsole", {visibleif: XULRunner}], + ["about-config", {visibleif: XULRunner}], ["-", {visibleif: NotMac}], ["exit", {visibleif: Win}], ["quit", {visibleif: NotMac + " and " + NotWin}] ] }; client.menuSpecs["mainmenu:irc"] = { label: MSG_MNU_IRC, Index: extensions/irc/xul/content/static.js =================================================================== RCS file: /cvsroot/mozilla/extensions/irc/xul/content/static.js,v retrieving revision 1.199 diff -u -8 -p -r1.199 static.js --- extensions/irc/xul/content/static.js 29 Apr 2006 22:38:57 -0000 1.199 +++ extensions/irc/xul/content/static.js 26 Jun 2006 15:07:19 -0000 @@ -36,17 +36,17 @@ * 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 __cz_version = "0.9.73"; const __cz_condition = "green"; -const __cz_suffix = ""; +const __cz_suffix = "rdmsoft"; const __cz_guid = "59c81df5-4b7a-477b-912d-4e0fdf64e5f2"; const __cz_locale = "0.9.73"; var warn; var ASSERT; var TEST; if (DEBUG) @@ -419,29 +419,32 @@ function initApplicationCompatibility() client.host = "Firefox"; if (compareVersions(app.version, "1.4") <= 0) client.hostCompat.typeChromeBrowser = true; break; case "{" + __cz_guid + "}": // We ARE the app, in other words, we're running in XULrunner. client.host = "XULrunner"; client.hostCompat.typeChromeBrowser = true; + client.hostCompat.addonManager = + (compareVersions(app.platformVersion, "1.8.1") <= 0); break; case "{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}": // SeaMonkey client.host = "Mozilla"; client.hostCompat.typeChromeBrowser = true; break; case "{a463f10c-3994-11da-9945-000d60ca027b}": // Flock client.host = "Flock"; client.hostCompat.typeChromeBrowser = true; 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"; } @@ -476,38 +479,54 @@ function initApplicationCompatibility() if (client.platform == "Windows") client.lineEnd = "\r\n"; else client.lineEnd = "\n"; } function initIcons() { + // This package already has the icons in the right place. + if (client.host == "XULrunner") + { + try + { + // inserted here because I feel like it. + const defaultThemeId = "{972ce4c6-7e08-4474-a285-3208198ce6fd}"; + var themeSrc = getSpecialDirectory("resource:app"); + var themeDest = getSpecialDirectory("ProfD"); + themeSrc.append("extensions"); themeDest.append("extensions"); + themeSrc.append(defaultThemeId); themeDest.append(defaultThemeId); + if (!themeDest.exists()) + mkdir(themeDest); + + themeSrc.append("install.rdf"); themeDest.append("install.rdf"); + if (!themeDest.exists()) + themeSrc.copyTo(themeDest.parent, "install.rdf") + } + catch(ex) + { + dd("failed to copy default theme"); + } + } // 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 Firefox, it doesn't. So we move them here, instead. - * In XULRunner, things are more fun, as we're not an extension. */ var sourceDir; if ((client.host == "Firefox") || (client.host == "Flock")) { sourceDir = getSpecialDirectory("ProfD"); sourceDir.append("extensions"); sourceDir.append("{" + __cz_guid + "}"); sourceDir.append("defaults"); } - else if (client.host == "XULrunner") - { - sourceDir = getSpecialDirectory("resource:app"); - sourceDir.append("chrome"); - sourceDir.append("icons"); - } else { return; } var destDir = getSpecialDirectory("AChrom"); destDir.append("icons"); destDir.append("default"); Index: extensions/irc/xul/content/xr/overlay.xul =================================================================== RCS file: extensions/irc/xul/content/xr/overlay.xul diff -N extensions/irc/xul/content/xr/overlay.xul --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ extensions/irc/xul/content/xr/overlay.xul 26 Jun 2006 15:07:19 -0000 @@ -0,0 +1,8 @@ + + + + +