From 7614d3e2565133028f607a2766797a81e8bfc1f6 Mon Sep 17 00:00:00 2001 From: Sergey Yanovich Date: Thu, 3 Apr 2008 15:03:16 +0300 Subject: [PATCH] [extra] Import Firefox 3.0 beta 5 tarball --- extensions/help/Makefile.in | 50 ++ extensions/help/help.pkg | 2 + extensions/help/makefiles.sh | 42 ++ extensions/help/resources/Makefile.in | 46 ++ extensions/help/resources/content/contents.rdf | 225 ++++++ extensions/help/resources/content/contextHelp.js | 98 +++ extensions/help/resources/content/help.js | 751 +++++++++++++++++++++ extensions/help/resources/content/help.xul | 325 +++++++++ .../help/resources/content/helpContextOverlay.xul | 88 +++ .../help/resources/content/helpMenuOverlay.xul | 46 ++ .../resources/content/helpMessengerOverlay.xul | 87 +++ .../help/resources/content/helpSecurityOverlay.xul | 180 +++++ .../help/resources/content/platformClasses.css | 12 + extensions/help/resources/jar.mn | 27 + .../help/resources/locale/en-US/contents.rdf | 23 + extensions/help/resources/locale/en-US/help.dtd | 33 + .../resources/locale/en-US/helpMenuOverlay.dtd | 4 + .../help/resources/locale/en-US/mozillahelp.rdf | 30 + extensions/help/resources/skin/classic/help.css | 120 ++++ extensions/help/resources/skin/modern/help.css | 144 ++++ extensions/help/resources/skin/modern/home-act.gif | Bin 0 -> 2230 bytes extensions/help/resources/skin/modern/home-dis.gif | Bin 0 -> 1821 bytes extensions/help/resources/skin/modern/home-hov.gif | Bin 0 -> 2222 bytes extensions/help/resources/skin/modern/home.gif | Bin 0 -> 2222 bytes extensions/irc/ff/jar.mn | 2 +- extensions/irc/locales/generic/install.rdf | 2 +- extensions/irc/sm/jar.mn | 2 +- extensions/irc/xpi/resources/install.rdf | 2 +- extensions/irc/xul/content/config.js | 20 +- extensions/irc/xul/content/handlers.js | 2 +- extensions/irc/xul/content/menus.js | 2 +- extensions/irc/xul/content/output-base.css | 2 + extensions/irc/xul/content/prefs.js | 10 + extensions/irc/xul/content/static.js | 7 +- .../schema-validation/src/nsSchemaValidator.cpp | 12 +- .../src/nsSchemaValidatorUtils.cpp | 45 +- .../schema-validation/src/nsSchemaValidatorUtils.h | 4 +- extensions/schema-validation/tests/schema.html | 11 + .../locales/en-US/chrome/venkman.properties | 2 +- extensions/venkman/resources/content/contents.rdf | 2 +- .../resources/content/venkman-output-base.css | 2 + .../venkman/resources/content/venkman-static.js | 2 +- extensions/venkman/version.txt | 2 +- extensions/venkman/xpi/resources/install.rdf | 2 +- 44 files changed, 2439 insertions(+), 29 deletions(-) create mode 100644 extensions/help/Makefile.in create mode 100644 extensions/help/help.pkg create mode 100755 extensions/help/makefiles.sh create mode 100644 extensions/help/resources/Makefile.in create mode 100644 extensions/help/resources/content/contents.rdf create mode 100755 extensions/help/resources/content/contextHelp.js create mode 100644 extensions/help/resources/content/help.js create mode 100644 extensions/help/resources/content/help.xul create mode 100755 extensions/help/resources/content/helpContextOverlay.xul create mode 100644 extensions/help/resources/content/helpMenuOverlay.xul create mode 100644 extensions/help/resources/content/helpMessengerOverlay.xul create mode 100644 extensions/help/resources/content/helpSecurityOverlay.xul create mode 100644 extensions/help/resources/content/platformClasses.css create mode 100644 extensions/help/resources/jar.mn create mode 100644 extensions/help/resources/locale/en-US/contents.rdf create mode 100644 extensions/help/resources/locale/en-US/help.dtd create mode 100644 extensions/help/resources/locale/en-US/helpMenuOverlay.dtd create mode 100755 extensions/help/resources/locale/en-US/mozillahelp.rdf create mode 100644 extensions/help/resources/skin/classic/help.css create mode 100644 extensions/help/resources/skin/modern/help.css create mode 100644 extensions/help/resources/skin/modern/home-act.gif create mode 100644 extensions/help/resources/skin/modern/home-dis.gif create mode 100644 extensions/help/resources/skin/modern/home-hov.gif create mode 100644 extensions/help/resources/skin/modern/home.gif diff --git a/extensions/help/Makefile.in b/extensions/help/Makefile.in new file mode 100644 index 0000000..258d260 --- /dev/null +++ b/extensions/help/Makefile.in @@ -0,0 +1,50 @@ +# +# ***** 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 $(DEPTH)/config/autoconf.mk + +MODULE = help +PACKAGE_FILE = help.pkg + +DIRS = resources + +include $(topsrcdir)/config/rules.mk diff --git a/extensions/help/help.pkg b/extensions/help/help.pkg new file mode 100644 index 0000000..1ddad3d --- /dev/null +++ b/extensions/help/help.pkg @@ -0,0 +1,2 @@ +[xpfe-browser] +dist/bin/chrome/help.jar diff --git a/extensions/help/makefiles.sh b/extensions/help/makefiles.sh new file mode 100755 index 0000000..3ce7265 --- /dev/null +++ b/extensions/help/makefiles.sh @@ -0,0 +1,42 @@ +#! /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 Build System +# +# The Initial Developer of the Original Code is +# Ben Turner +# +# 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 ***** + +add_makefiles " + extensions/help/Makefile + extensions/help/resources/Makefile +" diff --git a/extensions/help/resources/Makefile.in b/extensions/help/resources/Makefile.in new file mode 100644 index 0000000..0b27e43 --- /dev/null +++ b/extensions/help/resources/Makefile.in @@ -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 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 $(DEPTH)/config/autoconf.mk + +include $(topsrcdir)/config/rules.mk + diff --git a/extensions/help/resources/content/contents.rdf b/extensions/help/resources/content/contents.rdf new file mode 100644 index 0000000..1358cbd --- /dev/null +++ b/extensions/help/resources/content/contents.rdf @@ -0,0 +1,225 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + chrome://help/content/helpMenuOverlay.xul + + + + chrome://help/content/helpEditorOverlay.xul + + + + chrome://help/content/helpEditorOverlay.xul + + + + chrome://help/content/helpEditorOverlay.xul + + + + chrome://help/content/helpEditorOverlay.xul + + + + chrome://help/content/helpEditorOverlay.xul + + + + chrome://help/content/helpEditorOverlay.xul + + + + chrome://help/content/helpEditorOverlay.xul + + + + chrome://help/content/helpSecurityOverlay.xul + + + + chrome://help/content/helpSecurityOverlay.xul + + + + chrome://help/content/helpSecurityOverlay.xul + + + + chrome://help/content/helpSecurityOverlay.xul + + + + chrome://help/content/helpSecurityOverlay.xul + + + + chrome://help/content/helpSecurityOverlay.xul + + + + chrome://help/content/helpSecurityOverlay.xul + + + + chrome://help/content/helpSecurityOverlay.xul + + + + chrome://help/content/helpSecurityOverlay.xul + + + + chrome://help/content/helpSecurityOverlay.xul + + + + chrome://help/content/helpSecurityOverlay.xul + + + + chrome://help/content/helpSecurityOverlay.xul + + + + chrome://help/content/helpSecurityOverlay.xul + + + + chrome://help/content/helpSecurityOverlay.xul + + + + chrome://help/content/helpSecurityOverlay.xul + + + + chrome://help/content/helpSecurityOverlay.xul + + + + chrome://help/content/helpSecurityOverlay.xul + + + + chrome://help/content/helpSecurityOverlay.xul + + + + chrome://help/content/helpSecurityOverlay.xul + + + + chrome://help/content/helpSecurityOverlay.xul + + + + chrome://help/content/helpSecurityOverlay.xul + + + + chrome://help/content/helpSecurityOverlay.xul + + + + chrome://help/content/helpMessengerOverlay.xul + + + + chrome://help/content/helpMessengerOverlay.xul + + + + chrome://help/content/helpMessengerOverlay.xul + + + + chrome://help/content/helpMessengerOverlay.xul + + + + chrome://help/content/helpMessengerOverlay.xul + + + + chrome://help/content/helpMessengerOverlay.xul + + + + chrome://help/content/helpMessengerOverlay.xul + + + + chrome://help/content/helpMessengerOverlay.xul + + + + chrome://help/content/helpMessengerOverlay.xul + + + + chrome://help/content/helpMessengerOverlay.xul + + + + chrome://help/content/helpMessengerOverlay.xul + + diff --git a/extensions/help/resources/content/contextHelp.js b/extensions/help/resources/content/contextHelp.js new file mode 100755 index 0000000..157167d --- /dev/null +++ b/extensions/help/resources/content/contextHelp.js @@ -0,0 +1,98 @@ +/* -*- 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 Mozilla Communicator client code, released + * March 31, 1998. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-1999 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * R.J. Keller + * + * 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 MOZILLA_CONTENT_PACK = "chrome://communicator/locale/help/suitehelp.rdf"; +//Set the default content pack to the Mozilla content pack. Use the +//setHelpFileURI function to set this value. +var helpFileURI = MOZILLA_CONTENT_PACK; + +// openHelp - Opens up the Mozilla Help Viewer with the specified +// topic and content pack. +// see http://www.mozilla.org/projects/help-viewer/content_packs.html +function openHelp(topic, contentPack) +{ + //cp is the content pack to use in this function. If the contentPack + //parameter was set, we will use that content pack. If not, we will + //use the default content pack set by setHelpFileURI(). + var cp = contentPack || helpFileURI; + + // Try to find previously opened help. + var topWindow = locateHelpWindow(cp); + + if ( topWindow ) { + // Open topic in existing window. + topWindow.focus(); + topWindow.displayTopic(topic); + } else { + // Open topic in new window. + const params = Components.classes["@mozilla.org/embedcomp/dialogparam;1"] + .createInstance(Components.interfaces.nsIDialogParamBlock); + params.SetNumberStrings(2); + params.SetString(0, cp); + params.SetString(1, topic); + const ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"] + .getService(Components.interfaces.nsIWindowWatcher); + ww.openWindow(null, "chrome://help/content/help.xul", "_blank", "chrome,all,alwaysRaised,dialog=no", params); + } +} + +//setHelpFileURI - Sets the default content pack to use in the Help Viewer +function setHelpFileURI(rdfURI) { + helpFileURI = rdfURI; +} + +// Locate mozilla:help window (if any) opened for this help file uri. +function locateHelpWindow(helpFileURI) { + const windowManager = Components.classes['@mozilla.org/appshell/window-mediator;1'] + .getService(Components.interfaces.nsIWindowMediator); + var iterator = windowManager.getEnumerator("mozilla:help"); + var topWindow = null; + var currentWindow; + + // Loop through the help windows looking for one with the + // current Help Content Pack loaded. + while (iterator.hasMoreElements()) { + currentWindow = iterator.getNext(); + if (currentWindow.getHelpFileURI() == helpFileURI) { + topWindow = currentWindow; + break; + } + } + return topWindow; +} diff --git a/extensions/help/resources/content/help.js b/extensions/help/resources/content/help.js new file mode 100644 index 0000000..3ae09c0 --- /dev/null +++ b/extensions/help/resources/content/help.js @@ -0,0 +1,751 @@ +/* -*- 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 Mozilla Communicator client code, released + * March 31, 1998. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-1999 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Ian Oeschger (Original Author) + * Peter Wilson (added sidebar tabs) + * R.J. Keller + * + * 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 ***** */ + +//-------- global variables +var helpBrowser; +var helpExternal; +var helpSearchPanel; +var emptySearch; +var emptySearchText = "No search items found."; +var emptySearchLink = "about:blank"; +var helpTocPanel; +var helpIndexPanel; +var helpGlossaryPanel; + +// Namespaces +const NC = "http://home.netscape.com/NC-rdf#"; +const MAX_LEVEL = 40; // maximum depth of recursion in search datasources. + +// Resources +const RDF = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService); +const RDF_ROOT = RDF.GetResource("urn:root"); +const NC_PANELLIST = RDF.GetResource(NC + "panellist"); +const NC_PANELID = RDF.GetResource(NC + "panelid"); +const NC_PLATFORM = RDF.GetResource(NC + "platform"); +const NC_EMPTY_SEARCH_TEXT = RDF.GetResource(NC + "emptysearchtext"); +const NC_EMPTY_SEARCH_LINK = RDF.GetResource(NC + "emptysearchlink"); +const NC_DATASOURCES = RDF.GetResource(NC + "datasources"); +const NC_SUBHEADINGS = RDF.GetResource(NC + "subheadings"); +const NC_NAME = RDF.GetResource(NC + "name"); +const NC_CHILD = RDF.GetResource(NC + "child"); +const NC_LINK = RDF.GetResource(NC + "link"); +const NC_TITLE = RDF.GetResource(NC + "title"); +const NC_BASE = RDF.GetResource(NC + "base"); +const NC_DEFAULTTOPIC = RDF.GetResource(NC + "defaulttopic"); + +const RDFCUtils = Components.classes["@mozilla.org/rdf/container-utils;1"].getService(Components.interfaces.nsIRDFContainerUtils); +var RDFContainer = Components.classes["@mozilla.org/rdf/container;1"].createInstance(Components.interfaces.nsIRDFContainer); +const CONSOLE_SERVICE = Components.classes['@mozilla.org/consoleservice;1'].getService(Components.interfaces.nsIConsoleService); + +var RE; + +var helpFileURI; +var helpFileDS; +// Set from nc:base attribute on help rdf file. It may be used for prefix reduction on all links within +// the current help set. +var helpBaseURI; + +const defaultHelpFile = "chrome://help/locale/mozillahelp.rdf"; +// Set from nc:defaulttopic. It is used when the requested uri has no topic specified. +var defaultTopic = "welcome"; +var searchDatasources = "rdf:null"; +var searchDS = null; +var platform = /mac/i.test(navigator.platform) ? "mac" : + /win/i.test(navigator.platform) ? "win" : + /os\/2/i.test(navigator.platform) ? "os/2" : "unix"; + +const NSRESULT_RDF_SYNTAX_ERROR = 0x804e03f7; + +// This function is called by dialogs/windows that want to display context-sensitive help +// These dialogs/windows should include the script chrome://help/content/contextHelp.js +function displayTopic(topic) { + // Use default topic if topic is not specified. + if (!topic) + topic = defaultTopic; + + // Get the help page to open. + var uri = getLink(topic); + + // Use default topic if specified topic is not found. + if (!uri) // Topic not found - revert to default. + uri = getLink(defaultTopic); + loadURI(uri); +} + +var helpContentListener = { + onStartURIOpen: function(aURI) { + return false; + }, + doContent: function(aContentType, aIsContentPreferred, aRequest, aContentHandler) { + throw Components.results.NS_ERROR_UNEXPECTED; + }, + isPreferred: function(aContentType, aDesiredContentType) { + return false; + }, + canHandleContent: function(aContentType, aIsContentPreferred, aDesiredContentType) { + return false; + }, + loadCookie: null, + parentContentListener: null, + QueryInterface: function (aIID) { + if (aIID.equals(Components.interfaces.nsIURIContentListener) || + aIID.equals(Components.interfaces.nsISupportsWeakReference) || + aIID.equals(Components.interfaces.nsISupports)) + return this; + Components.returnCode = Components.results.NS_ERROR_NO_INTERFACE; + return null; + } +}; + +// Initialize the Help window +function init() { + //cache panel references. + helpSearchPanel = document.getElementById("help-search-panel"); + helpTocPanel = document.getElementById("help-toc-panel"); + helpIndexPanel = document.getElementById("help-index-panel"); + helpGlossaryPanel = document.getElementById("help-glossary-panel"); + helpBrowser = document.getElementById("help-content"); + helpExternal = document.getElementById("help-external"); + helpExternal.docShell.useErrorPages = false; + helpExternal + .docShell + .QueryInterface(Components.interfaces.nsIInterfaceRequestor) + .getInterface(Components.interfaces.nsIURIContentListener) + .parentContentListener = helpContentListener; + + // Get the help content pack, base URL, and help topic + var helpTopic = defaultTopic; + if ("arguments" in window && window.arguments[0] instanceof Components.interfaces.nsIDialogParamBlock) { + helpFileURI = window.arguments[0].GetString(0); + helpBaseURI = helpFileURI.substring(0, helpFileURI.lastIndexOf("/")+1); // trailing "/" included. + helpTopic = window.arguments[0].GetString(1); + } + + loadHelpRDF(); + + displayTopic(helpTopic); + + window.XULBrowserWindow = new nsHelpStatusHandler(); + + //Start the status handler. + window.XULBrowserWindow.init(); + + // Hook up UI through Progress Listener + helpBrowser.addProgressListener(window.XULBrowserWindow, Components.interfaces.nsIWebProgress.NOTIFY_ALL); + helpExternal.addProgressListener(window.XULBrowserWindow, Components.interfaces.nsIWebProgress.NOTIFY_ALL); + + //Always show the Table of Contents sidebar at startup. + showPanel('help-toc'); + + // alwaysRaised only works on Mac & Win. + if (!/Win|Mac/.test(navigator.platform)) { + var toggleSeparator = document.getElementById("context-sep-selectall"); + var toggleOnTop = document.getElementById("context-zlevel"); + toggleOnTop.hidden = true; + toggleSeparator.hidden = true; + } +} + +function contentClick(event) { + // is this a left click on a link? + if (event.shiftKey || event.ctrlKey || event.altKey || event.metaKey || event.button != 0) + return true; + + // is this a link? + var target = event.target; + while (!(target instanceof HTMLAnchorElement)) + if (!(target = target.parentNode)) + return true; + + // is this an internal link? + if (target.href.lastIndexOf("chrome:", 0) == 0) + return true; + + var formatter = Components.classes["@mozilla.org/toolkit/URLFormatterService;1"] + .getService(Components.interfaces.nsIURLFormatter); + var uri = target.href; + if (/^x-moz-url-link:/.test(uri)) + uri = formatter.formatURLPref(RegExp.rightContext); + + const loadFlags = Components.interfaces.nsIWebNavigation.LOAD_FLAGS_IS_LINK; + try { + helpExternal.webNavigation.loadURI(uri, loadFlags, null, null, null); + } catch (e) {} + return false; +} + +function loadHelpRDF() { + if (!helpFileDS) { + try { + helpFileDS = RDF.GetDataSourceBlocking(helpFileURI); + } + catch (e if (e.result == NSRESULT_RDF_SYNTAX_ERROR)) { + log("Help file: " + helpFileURI + " contains a syntax error."); + } + catch (e) { + log("Help file: " + helpFileURI + " was not found."); + } + try { + document.title = getAttribute(helpFileDS, RDF_ROOT, NC_TITLE, ""); + helpBaseURI = getAttribute(helpFileDS, RDF_ROOT, NC_BASE, helpBaseURI); + defaultTopic = getAttribute(helpFileDS, RDF_ROOT, NC_DEFAULTTOPIC, "welcome"); + + var panelDefs = helpFileDS.GetTarget(RDF_ROOT, NC_PANELLIST, true); + RDFContainer.Init(helpFileDS, panelDefs); + var iterator = RDFContainer.GetElements(); + while (iterator.hasMoreElements()) { + var panelDef = iterator.getNext(); + + var panelPlatforms = getAttribute(helpFileDS, panelDef, NC_PLATFORM, platform); + panelPlatforms = panelPlatforms.split(/\s+/); + + if (panelPlatforms.indexOf(platform) == -1) + continue; // ignore datasources for other platforms. + + var panelID = getAttribute(helpFileDS, panelDef, NC_PANELID, null); + + var datasources = getAttribute(helpFileDS, panelDef, NC_DATASOURCES, "rdf:null"); + datasources = normalizeLinks(helpBaseURI, datasources); + // cache additional datsources to augment search datasources. + if (panelID == "search") { + emptySearchText = getAttribute(helpFileDS, panelDef, NC_EMPTY_SEARCH_TEXT, emptySearchText); + emptySearchLink = getAttribute(helpFileDS, panelDef, NC_EMPTY_SEARCH_LINK, emptySearchLink); + searchDatasources += " " + datasources; + continue; // but don't try to display them yet! + } + + // cache toc datasources for use by ID lookup. + var tree = document.getElementById("help-" + panelID + "-panel"); + loadDatabasesBlocking(datasources); + tree.setAttribute("datasources", tree.getAttribute("datasources") + " " + datasources); + } + } + catch (e) { + log(e + ""); + } + } +} + +function loadDatabasesBlocking(datasources) { + var ds = datasources.split(/\s+/); + for (var i=0; i < ds.length; ++i) { + if (ds[i] == "rdf:null" || ds[i] == "") + continue; + try { + // we need blocking here to ensure the database is loaded so getLink(topic) works. + var datasource = RDF.GetDataSourceBlocking(ds[i]); + } + catch (e) { + log("Datasource: " + ds[i] + " was not found."); + } + } +} + +// prepend helpBaseURI to list of space separated links if the don't start with "chrome:" +function normalizeLinks(helpBaseURI, links) { + if (!helpBaseURI) + return links; + var ls = links.split(/\s+/); + if (ls.length == 0) + return links; + for (var i=0; i < ls.length; ++i) { + if (ls[i] == "") + continue; + if (ls[i].substr(0,7) != "chrome:" && ls[i].substr(0,4) != "rdf:") + ls[i] = helpBaseURI + ls[i]; + } + return ls.join(" "); +} + +function getLink(ID) { + if (!ID) + return null; + // Note resources are stored in fileURL#ID format. + // We have one possible source for an ID for each datasource in the composite datasource. + // The first ID which matches is returned. + var tocTree = document.getElementById("help-toc-panel"); + var tocDS = tocTree.database; + if (tocDS == null) + return null; + var tocDatasources = tocTree.getAttribute("datasources"); + var ds = tocDatasources.split(/\s+/); + for (var i=0; i < ds.length; ++i) { + if (ds[i] == "rdf:null" || ds[i] == "") + continue; + try { + var rdfID = ds[i] + "#" + ID; + var resource = RDF.GetResource(rdfID); + if (resource) { + var link = tocDS.GetTarget(resource, NC_LINK, true); + if (link) { + link = link.QueryInterface(Components.interfaces.nsIRDFLiteral); + if (link) + return link.Value; + else + return null; + } + } + } + catch (e) { log(rdfID + " " + e);} + } + return null; +} + +// Called by contextHelp.js to determine if this window is displaying the requested help file. +function getHelpFileURI() { + return helpFileURI; +} + + +function getWebNavigation() +{ + return helpBrowser.webNavigation; +} + +function loadURI(uri) +{ + if (uri.substr(0,7) != "chrome:") + uri = helpBaseURI + uri; + const nsIWebNavigation = Components.interfaces.nsIWebNavigation; + getWebNavigation().loadURI(uri, nsIWebNavigation.LOAD_FLAGS_NONE, null, null, null); +} + +function goBack() +{ + var webNavigation = getWebNavigation(); + if (webNavigation.canGoBack) + webNavigation.goBack(); +} + +function goForward() +{ + var webNavigation = getWebNavigation(); + if (webNavigation.canGoForward) + webNavigation.goForward(); +} + +function goHome() { + // load "Welcome" page + displayTopic(defaultTopic); +} + +function print() +{ + try { + content.print(); + } catch (e) { + } +} + +function createBackMenu(event) +{ + return FillHistoryMenu(event.target, "back"); +} + +function createForwardMenu(event) +{ + return FillHistoryMenu(event.target, "forward"); +} + +function gotoHistoryIndex(aEvent) +{ + var index = aEvent.target.getAttribute("index"); + if (!index) + return false; + try { + getWebNavigation().gotoIndex(index); + } + catch(ex) { + return false; + } + return true; +} + +function nsHelpStatusHandler() +{ +} + +nsHelpStatusHandler.prototype = +{ + onStateChange : function(aWebProgress, aRequest, aStateFlags, aStatus) + { + const nsIWebProgressListener = Components.interfaces.nsIWebProgressListener; + + // Turn on the throbber. + if (aStateFlags & nsIWebProgressListener.STATE_START) + this.throbberElement.setAttribute("busy", "true"); + else if (aStateFlags & nsIWebProgressListener.STATE_STOP) + this.throbberElement.removeAttribute("busy"); + }, + onStatusChange : function(aWebProgress, aRequest, aStateFlags, aStatus) {}, + onProgressChange : function(aWebProgress, aRequest, aCurSelfProgress, + aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress) {}, + onSecurityChange : function(aWebProgress, aRequest, state) {}, + onLocationChange : function(aWebProgress, aRequest, aLocation) + { + UpdateBackForwardButtons(); + }, + QueryInterface : function(aIID) + { + if (aIID.equals(Components.interfaces.nsIWebProgressListener) || + aIID.equals(Components.interfaces.nsISupportsWeakReference) || + aIID.equals(Components.interfaces.nsIXULBrowserWindow) || + aIID.equals(Components.interfaces.nsISupports)) + return this; + throw Components.results.NS_NOINTERFACE; + }, + + init : function() + { + this.throbberElement = document.getElementById("navigator-throbber"); + }, + + destroy : function() + { + //this is needed to avoid memory leaks, see bug 60729 + this.throbberElement = null; + }, + + setJSStatus : function(status) {}, + setJSDefaultStatus : function(status) {}, + setOverLink : function(link, context) {} +} + +function UpdateBackForwardButtons() +{ + var backBroadcaster = document.getElementById("canGoBack"); + var forwardBroadcaster = document.getElementById("canGoForward"); + var webNavigation = getWebNavigation(); + + // Avoid setting attributes on broadcasters if the value hasn't changed! + // Remember, guys, setting attributes on elements is expensive! They + // get inherited into anonymous content, broadcast to other widgets, etc.! + // Don't do it if the value hasn't changed! - dwh + + var backDisabled = (backBroadcaster.getAttribute("disabled") == "true"); + var forwardDisabled = (forwardBroadcaster.getAttribute("disabled") == "true"); + + if (backDisabled == webNavigation.canGoBack) + backBroadcaster.setAttribute("disabled", !backDisabled); + + if (forwardDisabled == webNavigation.canGoForward) + forwardBroadcaster.setAttribute("disabled", !forwardDisabled); +} + +var gFindInstData; +function getFindInstData() +{ + if (!gFindInstData) { + gFindInstData = new nsFindInstData(); + gFindInstData.browser = helpBrowser; + // defaults for rootSearchWindow and currentSearchWindow are fine here + } + return gFindInstData; +} + +function find(again, reverse) +{ + if (again) + findAgainInPage(getFindInstData(), reverse); + else + findInPage(getFindInstData()) +} + +function getMarkupDocumentViewer() +{ + return helpBrowser.markupDocumentViewer; +} + +//Show the selected sidebar panel +function showPanel(panelId) { + //hide other sidebar panels and show the panel name taken in from panelID. + helpSearchPanel.setAttribute("hidden", "true"); + helpTocPanel.setAttribute("hidden", "true"); + helpIndexPanel.setAttribute("hidden", "true"); + helpGlossaryPanel.setAttribute("hidden", "true"); + var thePanel = document.getElementById(panelId + "-panel"); + thePanel.setAttribute("hidden","false"); + + //remove the selected style from the previous panel selected. + document.getElementById("help-glossary-btn").removeAttribute("selected"); + document.getElementById("help-index-btn").removeAttribute("selected"); + document.getElementById("help-search-btn").removeAttribute("selected"); + document.getElementById("help-toc-btn").removeAttribute("selected"); + + //add the selected style to the correct panel. + var theButton = document.getElementById(panelId + "-btn"); + theButton.setAttribute("selected", "true"); + document.commandDispatcher.advanceFocusIntoSubtree(theButton); +} + +function onselect_loadURI(tree) { + var row = tree.currentIndex; + if (row >= 0) { + var resource = tree.view.getResourceAtIndex(row); + var link = tree.database.GetTarget(resource, NC_LINK, true); + if (link instanceof Components.interfaces.nsIRDFLiteral && link.Value) + loadURI(link.Value); + } +} + +function doFind() { + var searchTree = document.getElementById("help-search-tree"); + var findText = document.getElementById("findText"); + + // clear any previous results. + clearDatabases(searchTree.database); + + // if the search string is empty or contains only whitespace, purge the results tree and return + RE = findText.value.match(/\S+/g); + if (!RE) { + searchTree.builder.rebuild(); + return; + } + + // compile the search string, which has already been split up above, into regexps + for (var i=0; i < RE.length; ++i) { + RE[i] = new RegExp(RE[i], "i"); + } + emptySearch = true; + + // search TOC + var resultsDS = Components.classes["@mozilla.org/rdf/datasource;1?name=in-memory-datasource"].createInstance(Components.interfaces.nsIRDFDataSource); + var tree = document.getElementById("help-toc-panel"); + var sourceDS = tree.database; + doFindOnDatasource(resultsDS, sourceDS, RDF_ROOT, 0); + + // search additional search datasources + if (searchDatasources != "rdf:null") { + if (!searchDS) + searchDS = loadCompositeDS(searchDatasources); + doFindOnDatasource(resultsDS, searchDS, RDF_ROOT, 0); + } + + // search index. + tree = document.getElementById("help-index-panel"); + sourceDS = tree.database; + if (!sourceDS) // If the index has never been displayed this will be null. + sourceDS = loadCompositeDS(tree.datasources); + doFindOnDatasource(resultsDS, sourceDS, RDF_ROOT, 0); + + // search glossary. + tree = document.getElementById("help-glossary-panel"); + sourceDS = tree.database; + if (!sourceDS) // If the glossary has never been displayed this will be null (sigh!). + sourceDS = loadCompositeDS(tree.datasources); + doFindOnDatasource(resultsDS, sourceDS, RDF_ROOT, 0); + + if (emptySearch) + assertSearchEmpty(resultsDS); + // Add the datasource to the search tree + searchTree.database.AddDataSource(resultsDS); + searchTree.builder.rebuild(); +} + +function clearDatabases(compositeDataSource) { + var enumDS = compositeDataSource.GetDataSources() + while (enumDS.hasMoreElements()) { + var ds = enumDS.getNext(); + compositeDataSource.RemoveDataSource(ds); + } +} + +function doFindOnDatasource(resultsDS, sourceDS, resource, level) { + if (level > MAX_LEVEL) { + try { + log("Recursive reference to resource: " + resource.Value + "."); + } + catch (e) { + log("Recursive reference to unknown resource."); + } + return; + } + // find all SUBHEADING children of current resource. + var targets = sourceDS.GetTargets(resource, NC_SUBHEADINGS, true); + while (targets.hasMoreElements()) { + var target = targets.getNext(); + target = target.QueryInterface(Components.interfaces.nsIRDFResource); + // The first child of a rdf:subheading should (must) be a rdf:seq. + // Should we test for a SEQ here? + doFindOnSeq(resultsDS, sourceDS, target, level+1); + } +} + +function doFindOnSeq(resultsDS, sourceDS, resource, level) { + // load up an RDFContainer so we can access the contents of the current rdf:seq. + RDFContainer.Init(sourceDS, resource); + var targets = RDFContainer.GetElements(); + while (targets.hasMoreElements()) { + var target = targets.getNext(); + var link = sourceDS.GetTarget(target, NC_LINK, true); + var name = sourceDS.GetTarget(target, NC_NAME, true); + name = name.QueryInterface(Components.interfaces.nsIRDFLiteral); + if (link && isMatch(name.Value)) { + // we have found a search entry - add it to the results datasource. + var urn = RDF.GetAnonymousResource(); + resultsDS.Assert(urn, NC_NAME, name, true); + resultsDS.Assert(urn, NC_LINK, link, true); + resultsDS.Assert(RDF_ROOT, NC_CHILD, urn, true); + emptySearch = false; + } + // process any nested rdf:seq elements. + doFindOnDatasource(resultsDS, sourceDS, target, level+1); + } +} + +function assertSearchEmpty(resultsDS) { + var resSearchEmpty = RDF.GetResource("urn:emptySearch"); + resultsDS.Assert(RDF_ROOT, + NC_CHILD, + resSearchEmpty, + true); + resultsDS.Assert(resSearchEmpty, + NC_NAME, + RDF.GetLiteral(emptySearchText), + true); + resultsDS.Assert(resSearchEmpty, + NC_LINK, + RDF.GetLiteral(emptySearchLink), + true); +} + +function isMatch(text) { + for (var i=0; i < RE.length; ++i ) { + if (!RE[i].test(text)) + return false; + } + return true; +} + +function loadCompositeDS(datasources) { + // We can't search on each individual datasource's - only the aggregate (for each sidebar tab) + // has the appropriate structure. + var compositeDS = Components.classes["@mozilla.org/rdf/datasource;1?name=composite-datasource"] + .createInstance(Components.interfaces.nsIRDFCompositeDataSource); + + var ds = datasources.split(/\s+/); + for (var i=0; i < ds.length; ++i) { + if (ds[i] == "rdf:null" || ds[i] == "") + continue; + try { + // we need blocking here to ensure the database is loaded. + var sourceDS = RDF.GetDataSourceBlocking(ds[i]); + compositeDS.AddDataSource(sourceDS); + } + catch (e) { + log("Datasource: " + ds[i] + " was not found."); + } + } + return compositeDS; +} + +function getAttribute(datasource, resource, attributeResourceName, defaultValue) { + var literal = datasource.GetTarget(resource, attributeResourceName, true); + return literal instanceof Components.interfaces.nsIRDFLiteral ? literal.Value : defaultValue; +} +// Write debug string to error console. +function log(aText) { + CONSOLE_SERVICE.logStringMessage(aText); +} + + +//INDEX OPENING FUNCTION -- called in oncommand for index pane +// iterate over all the items in the outliner; +// open the ones at the top-level (i.e., expose the headings underneath +// the letters in the list. +function displayIndex() { + var treeview = helpIndexPanel.view; + var i = treeview.rowCount; + while (i--) + if (!treeview.getLevel(i) && !treeview.isContainerOpen(i)) + treeview.toggleOpenState(i); +} + +// Shows the panel relative to the currently selected panel. +// Takes a boolean parameter - if true it will show the next panel, +// otherwise it will show the previous panel. +function showRelativePanel(goForward) { + var selectedIndex = -1; + var sidebarBox = document.getElementById("helpsidebar-box"); + var sidebarButtons = new Array(); + for (var i = 0; i < sidebarBox.childNodes.length; i++) { + var btn = sidebarBox.childNodes[i]; + if (btn.nodeName == "toolbarbutton") { + if (btn.getAttribute("selected") == "true") + selectedIndex = sidebarButtons.length; + sidebarButtons.push(btn); + } + } + if (selectedIndex == -1) + return; + selectedIndex += goForward ? 1 : -1; + if (selectedIndex >= sidebarButtons.length) + selectedIndex = 0; + else if (selectedIndex < 0) + selectedIndex = sidebarButtons.length - 1; + sidebarButtons[selectedIndex].doCommand(); +} + +// getXulWin - Returns the current Help window as a nsIXULWindow. +function getXulWin() { + window.QueryInterface(Components.interfaces.nsIInterfaceRequestor); + var webnav = window.getInterface(Components.interfaces.nsIWebNavigation); + var dsti = webnav.QueryInterface(Components.interfaces.nsIDocShellTreeItem); + var treeowner = dsti.treeOwner; + var ifreq = treeowner.QueryInterface(Components.interfaces.nsIInterfaceRequestor); + + return ifreq.getInterface(Components.interfaces.nsIXULWindow); +} + +// toggleZLevel - Toggles whether or not the window will always appear on top. +// element is the DOM node that persists the checked state +function toggleZLevel(element) { + var xulwin = getXulWin(); + + // Now we can flip the zLevel, and set the attribute so that it persists correctly + if (xulwin.zLevel > xulwin.normalZ) { + xulwin.zLevel = xulwin.normalZ; + element.setAttribute("checked", "false"); + } else { + xulwin.zLevel = xulwin.raisedZ; + element.setAttribute("checked", "true"); + } +} diff --git a/extensions/help/resources/content/help.xul b/extensions/help/resources/content/help.xul new file mode 100644 index 0000000..e368510 --- /dev/null +++ b/extensions/help/resources/content/help.xul @@ -0,0 +1,325 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/extensions/help/resources/content/platformClasses.css b/extensions/help/resources/content/platformClasses.css new file mode 100644 index 0000000..8a34d93 --- /dev/null +++ b/extensions/help/resources/content/platformClasses.css @@ -0,0 +1,12 @@ +%ifdef XP_WIN +.noWin, .mac, .unix { display: none; } +%else +%ifdef XP_MACOSX +.noMac, .win, .unix { display: none; } +%else +%ifdef XP_OS2 +.noWin, .mac, .unix { display: none; } +%else +.noUnix, .win, .mac { display: none; } +%endif +%endif diff --git a/extensions/help/resources/jar.mn b/extensions/help/resources/jar.mn new file mode 100644 index 0000000..058d0d2 --- /dev/null +++ b/extensions/help/resources/jar.mn @@ -0,0 +1,27 @@ +help.jar: +* content/help/contents.rdf (content/contents.rdf) + content/help/contextHelp.js (content/contextHelp.js) + content/help/help.js (content/help.js) + content/help/help.xul (content/help.xul) + content/help/helpContextOverlay.xul (content/helpContextOverlay.xul) + content/help/helpEditorOverlay.xul (/suite/common/helpEditorOverlay.xul) +* content/help/helpMenuOverlay.xul (content/helpMenuOverlay.xul) + content/help/helpMessengerOverlay.xul (content/helpMessengerOverlay.xul) + content/help/helpSecurityOverlay.xul (content/helpSecurityOverlay.xul) +* content/help/platformClasses.css (content/platformClasses.css) + +en-US.jar: + locale/en-US/communicator/help/suitehelp.rdf (locale/en-US/mozillahelp.rdf) +* locale/en-US/help/contents.rdf (locale/en-US/contents.rdf) + locale/en-US/help/help.dtd (locale/en-US/help.dtd) + locale/en-US/help/helpMenuOverlay.dtd (locale/en-US/helpMenuOverlay.dtd) + +modern.jar: + skin/modern/communicator/help.css (skin/modern/help.css) + skin/modern/communicator/help/home.gif (skin/modern/home.gif) + skin/modern/communicator/help/home-act.gif (skin/modern/home-act.gif) + skin/modern/communicator/help/home-dis.gif (skin/modern/home-dis.gif) + skin/modern/communicator/help/home-hov.gif (skin/modern/home-hov.gif) + +classic.jar: + skin/classic/communicator/help.css (skin/classic/help.css) diff --git a/extensions/help/resources/locale/en-US/contents.rdf b/extensions/help/resources/locale/en-US/contents.rdf new file mode 100644 index 0000000..5e18968 --- /dev/null +++ b/extensions/help/resources/locale/en-US/contents.rdf @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/extensions/help/resources/locale/en-US/help.dtd b/extensions/help/resources/locale/en-US/help.dtd new file mode 100644 index 0000000..5ce482c --- /dev/null +++ b/extensions/help/resources/locale/en-US/help.dtd @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/extensions/help/resources/locale/en-US/helpMenuOverlay.dtd b/extensions/help/resources/locale/en-US/helpMenuOverlay.dtd new file mode 100644 index 0000000..a6af916 --- /dev/null +++ b/extensions/help/resources/locale/en-US/helpMenuOverlay.dtd @@ -0,0 +1,4 @@ + + + + diff --git a/extensions/help/resources/locale/en-US/mozillahelp.rdf b/extensions/help/resources/locale/en-US/mozillahelp.rdf new file mode 100755 index 0000000..6621ddf --- /dev/null +++ b/extensions/help/resources/locale/en-US/mozillahelp.rdf @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/extensions/help/resources/skin/classic/help.css b/extensions/help/resources/skin/classic/help.css new file mode 100644 index 0000000..9c1248f --- /dev/null +++ b/extensions/help/resources/skin/classic/help.css @@ -0,0 +1,120 @@ +/* ***** 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-1999 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Joe Hewitt (hewitt@netscape.com) + * Manuel Reimer (Manuel.Reimer@gmx.de) + * + * 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 ***** */ + +@import url("chrome://communicator/skin/sidebar/sidebar.css"); + +@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); + +/* ::::: primary toolbar buttons ::::: */ + +.toolbarbutton-1 { + list-style-image: url("chrome://communicator/skin/icons/communicatoricons.png") !important; +} + +#helpBackButton { + -moz-image-region: rect(60px 29px 89px 0); +} + +#helpBackButton:hover { + -moz-image-region: rect(60px 59px 89px 30px); +} + +#helpBackButton:hover:active { + -moz-image-region: rect(60px 89px 89px 60px); +} + +#helpBackButton[disabled="true"] { + -moz-image-region: rect(60px 119px 89px 90px) !important; +} + +#helpForwardButton { + -moz-image-region: rect(90px 29px 119px 0); +} + +#helpForwardButton:hover { + -moz-image-region: rect(90px 59px 119px 30px); +} + +#helpForwardButton:hover:active { + -moz-image-region: rect(90px 89px 119px 60px); +} + +#helpForwardButton[disabled="true"] { + -moz-image-region: rect(90px 119px 119px 90px) !important; +} + +#helpPrintButton { + -moz-image-region: rect(0 29px 29px 0); +} + +#helpPrintButton:hover { + -moz-image-region: rect(0 59px 29px 30px); +} + +#helpPrintButton:hover:active { + -moz-image-region: rect(0 89px 29px 60px); +} + +#helpPrintButton[disabled="true"] { + -moz-image-region: rect(0 119px 29px 90px) !important; +} + +#helpHomeButton { + -moz-image-region: rect(120px 29px 149px 0); +} + +#helpHomeButton:hover { + -moz-image-region: rect(120px 59px 149px 30px); +} + +#helpHomeButton:hover:active { + -moz-image-region: rect(120px 89px 149px 60px); +} + +#helpHomeButton[disabled="true"] { + -moz-image-region: rect(120px 119px 149px 90px) !important; +} + +#helpsidebar-box { + min-width: 18em; +} + +/* Mac-only */ +#statusbarDummy { + min-height: 15px !important; +} diff --git a/extensions/help/resources/skin/modern/help.css b/extensions/help/resources/skin/modern/help.css new file mode 100644 index 0000000..1dc9d5b --- /dev/null +++ b/extensions/help/resources/skin/modern/help.css @@ -0,0 +1,144 @@ +/* ***** 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-1999 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Joe Hewitt (hewitt@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 ***** */ + +@import url("chrome://communicator/skin/sidebar/sidebar.css"); + +@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); + +/* ::::: primary toolbar masthead ::::: */ + +.toolbar-primary-holder { + -moz-box-align: start; + background-image: url("chrome://communicator/skin/toolbar/prtb-bg-noline.gif"); +} + +/* Hides text below the above buttons */ +.toolbarbutton-1 > stack > .toolbarbutton-menubutton-button + > .toolbarbutton-text, +.toolbarbutton-1 > .toolbarbutton-text { + display: none; +} + +#helpBackButton > .toolbarbutton-menubutton-stack + > .toolbarbutton-menubutton-dropmarker, +#helpForwardButton > .toolbarbutton-menubutton-stack + > .toolbarbutton-menubutton-dropmarker +{ + margin: 30px 0px 0px 34px; +} + +/* ::::: primary toolbar buttons ::::: */ + +.toolbarbutton-1 { + list-style-image: url("chrome://navigator/skin/icons/btn1.gif"); + min-width: 0px; +} + +#helpBackButton { + -moz-image-region: rect(0, 41px, 38px, 0); +} + +#helpBackButton:hover { + -moz-image-region: rect(0, 83px, 38px, 42px); +} + +#helpBackButton:hover:active { + -moz-image-region: rect(0, 125px, 38px, 84px); +} + +#helpBackButton[disabled="true"] { + -moz-image-region: rect(0, 167px, 38px, 126px) !important; +} + +#helpForwardButton { + -moz-image-region: rect(39px, 41px, 77px, 0); +} + +#helpForwardButton:hover { + -moz-image-region: rect(39px, 83px, 77px, 42px); +} + +#helpForwardButton:hover:active { + -moz-image-region: rect(39px, 125px, 77px, 84px); +} + +#helpForwardButton[disabled="true"] { + -moz-image-region: rect(39px, 167px, 77px, 126px) !important; +} + +#helpHomeButton { + list-style-image: url("chrome://communicator/skin/help/home.gif"); +} + +#helpHomeButton:hover { + list-style-image: url("chrome://communicator/skin/help/home-hov.gif"); +} + +#helpHomeButton:hover:active { + list-style-image: url("chrome://communicator/skin/help/home-act.gif"); +} + +#helpHomeButton[disabled="true"] { + list-style-image: url("chrome://communicator/skin/help/home-dis.gif") !important; +} + +#helpPrintButton { + list-style-image: url("chrome://communicator/skin/icons/btn1.gif"); + -moz-image-region: rect(0, 49px, 33px, 0); +} + +#helpPrintButton:hover { + -moz-image-region: rect(0, 99px, 33px, 50px); +} + +#helpPrintButton:hover:active { + -moz-image-region: rect(0, 149px, 33px, 100px); +} + +#helpPrintButton[disabled="true"] { + -moz-image-region: rect(0, 199px, 33px, 150px) !important; +} + +#helpsidebar-box { + min-width: 18em; + background-color: #BDC7D6; +} + +/* Mac-only */ +#statusbarDummy { + border-top: none; +} diff --git a/extensions/help/resources/skin/modern/home-act.gif b/extensions/help/resources/skin/modern/home-act.gif new file mode 100644 index 0000000000000000000000000000000000000000..090b4937c9f0057976f01bc390cb6b1e6463d994 GIT binary patch literal 2230 zcwPav2ub%xNk%w1VJZM80QUd@xWmqgnW;5BNO^{qg^{1?`T3%-zOuf`?)v$>#?ebv zW606kovgZOc7;7cN%s8wdWe{r%gup~oW97@OH*CC#n8gc*1Xf%bAgeEqO8-}<9CIX z{{a6oH9MxX!PVU4t-8kDVK`@qW7VQ_)8z|8yo{e6#|lbfT;)7*xXq-=VLL`qUw zWpmu*?0SfnDJ?V3*574xgnQCeis*x_(} zjDU=rb%K!H_V(G}=xTU~isgOr-7xW?q>e2JH&vcI*?)5Y4~s<_40-Q{h3ip z;D3dT;`H@=iI}Oj!>qZ*nVzLvYkQ2Sv8=PbGB`ib*y4VRn5eeH^!)r%U20}^h}iG& zEHXQstGU?U=xKL|e2SY)QC7p(+~fB4;Pv&w%G9UL(YM0R)baAOzsp@}d17a69wI5w z*Wtg((@0KKd5D>+ueD@yf+8m_*4*aJ*WX@gbwWr@!OPWKXnjysTV`~FUv7WhDu7v*x%={yvW+&>Db=qu)WFm{r%F};@sov+282hlsKm5-jRmc7GmdyBEY$)v`~-1YQaY<;7# zzoWdv-s9`w^Ynj=owB~k%H835jGMmP-|6`Hz{}Qsnx$G?V64>Eg^7@Qfrr!E<9>;l zc!iTkP+83E?5DNC-0|}E`~0f4!iArzwZhJqu(`Fu&B)K$aDR`Jps(EG>&DO8z{%6B zx5U`s=iv7CA^8LV00000EC2ui04e|{000R808a@VNU)&6g9r_lTF9`W!-o(fN}Ncs zqQ#3CGdc_rqSP^N9W^pUMY5#Hk}g8HNXe1o%9Ai-rkY8!X02JZ7`EiNaMr9`Kvk(q zl`B}yqd=1?Em>-32ssNDXwmYMhO1&iTxs2^G^x<9LXDN#qd?&j9~dm0T_MOgA}3svK^2ai;D&&;vjMBcwS@3^9!OW-qE3-~bO8EZ3Z#dtUjc2nEzb z00C-<(Euea2op&d30SZ|3XjJBP|2ID&0suc?(0fKD>UgmQ84CCy zhJ#fgAcCK3;_mCG(hJ7TwHNS39V{z&pivALE;lwbg=>kFT9aK4Fw>806g-^ z2hKQAVB^NihsXd&JD4#4kVHT6HnIg66{{)B2TtJ706y#>k-;JbL_SE|KP<6G5IMN< z#SqJoFozW?K%AjN$|a17y%m6guc|!w(_K*G!r zGLQg77rz(*O%m`{UmHFB5#_2U>?MfiA($<0Ls&b9jLIX3M8Nc zVDzB|ClCn|2p}COSV05UxW-YaZx^JRMt#SHS`hdrR619!|L7m{EH5LlxGVHji>Mmfqsn(`4>ID`Nk zFo!)Dfe1eU!V8F?iyh!W6qNV{9t*(*ZQ#NNRB%Qlh(U}n5c8PFv29PU;`WQMgX9} z0BAsi3jn>sJIr7M5EPW5C{-vdS^?2J+`$Zg@W2(4pbc#p0H8^@f(LM62OAKS3M@^j zP#p?U5V({HFnz~6JiyeQ+JU4$1!^k{Dpa99lnN2OgAHt8hOT;bs{{oBR;Nl;g$4uw EJ7DrSGynhq literal 0 HcwPel00001 diff --git a/extensions/help/resources/skin/modern/home-dis.gif b/extensions/help/resources/skin/modern/home-dis.gif new file mode 100644 index 0000000000000000000000000000000000000000..cbe0c7ff97a657f3f344024b076adfa0289f4df9 GIT binary patch literal 1821 zcwPY=2jcigNk%w1VJZM80QUd@K}=xA&e*)h(S?wkiI$~mc7xU2VQ+wRgp@^5WTLLSO<8JjfR4q^*uu)x zRA6tn!pmxUi?Y4QjGCydxWKEn!cAFiskFPEs<(`or=6>~oT#;Vh?sYVmax0WuDZmg zvc99SzEfp*OkQ$>j+>92thc|(w7F zUT}hrnyPbxkV8{tH$hX~f7PzvcAgN;OMo%%(ueL+2H88 z#Lw8?=hofjzR1$k+T*{;)6&`D(AVI^&DX)p)ymS_$I#ix(c8?^+@`U*y~onF!pyhB z%zTTRVR3`C!pyY3$!BYBu zskFgyfs(Dazo4wSsI$PGtG14rsjs@mvAoBkt-AjJ|8#?tz{%99wZf{k!K$^w)Y{~7 zfs&@Py;Wj$R%COfvcEeI8g_g9z%c-@#(%Is`%GANi)WOQtwZO`3e2r&xgSf)WWpRaO za)H0d(?3sPA^8LV00000EC2ui04e|{000R802>J$NU)&6g9r^KTF9`W!-o(fN}Ncs zqQ#3CGit=RsH4Y^AVZ2A8IqC7lPFWFT**?Uqn9va%7iH*KmaFBX6l^zsHe}LKuL+w z;2?>iCWgG20cHTG)1Q%|N}Vc|)HiS+8VrCSrwT-ITsFc#GT}#P8H8>xp zodMyG0f!X8dblWa011TvYy(rWM7XeFWUm^SIMeAKsUcBReX)hB%@QsR=Gc*7xHI8P zphJhI_i9}&Paud1sDy7y4=cP}1k1uBjtM9&o`~Lk$$;uVB z9t{hKJTQa6LOBn>vuE1Qefu5<=E4dO?ljvS32R)f&~zP1ab=-3lPA91{7G}O&9uxRI$JU5W;Z{69i_umxfr2? zjW&uP<&+|@P=J6v9218Ev{Z0H2CbCP&Y0~GaY`5P_`nJj7Dzzll%m8bXE)iPqlyHS zO^_ZIx)9k827qFKhKfn#Vn;c1FcF8GjDF(iqa4^##%r;`K>{>DoFGdH7_hU!r}&`J zOAdEPfrB?n)bZ%5p|t9%B+-=rVN4iq>|*ICx17+*pBu#BtFK$+69Nu{h=Ywbt|kl0 zvdpG%jtQ1+k&Xi-;CjL+5O71q1@lA^MGSAO(gF&E&;fuJ%%*G8x&a8_Lj$`|!@~sB zTI)s)XTqb#KBkoN#vrJSkcJ=FM8NL4og}PqC$JpAg$ffyVCfBPRPhHK2ows2DgDks z$Os9*po9`_EUYjHD5nepH{;atKm^>t@x~t&-{8eCr1nwD&NHNO1Prq{!-vW$dt&s_ zp16QS17=V`035xzq0AaLs3~k8lB6Qf3`dMn1Ru_3q&jc#{@j| z0>~1Fira@gsqB%;EJeKf;0!jwoP9PXgcnZu1Uej`0lr2z5p;||2=Fj? z{Q?b#bkG4GT8wZ1B$DK>|Ni;Eqroyp*ntt4;0HgL;}C+79{`Zx3jR4Te~^fv1SdE_ zS5QC)R|oW<){ryvAdDQUmn##^gU2)vx>@z$|`~CgS*5B#+`P$;@thmIH zo~*^}>%-00evO^9zsp%_e$d$As4v+2H8M(b`>YfI~}E=KA@Xskl8v zOEo(}ae#+ezsb`pGCWOSbQ~ZkyvNc`T53>ZcFxz}L{Vek`1h>2#oYJyv%SgC*y5I? zv8lGhQ(b7*_VrIzT-e{}SZH{CjGI14Q@nLDu7v*x%={yvW+& z>Db=qu)WFn{r#uw>D=S$^!)tn`})$^;o0Bl+v4iP&Dg%j(y+YAsI|h>+vMHj>cGj= z+TiKj;_2Am=0Qwgp|HJ=oT_1GZghi`q}<%t-salj=&`=a&eh)B;_H#e$)2sdz{}RE z($(JM>$&jlpv};-zR6^9extI$c7>Cgw!dq6hG%z&Xm*3V#n4GmR%?8WzQ@sXdV<~J z>&Va9r?tTq86dU7&Z@P-sNQdnNGzRAkb+so73HbG5p ze~_cGzux2QA^8LV00000EC2ui04e|{000R806z&FNU)&6g9r_FTF9`W!-o(fN}Ncs zqQ#3CGdjF*q0>KQ9W^opMY5#Hk|r*gNXe1o%9Ai-hMGyUrma=B7`EiNaMdbUKt+iP z1uIw0qd=1?E!k=3g*Aorsg(+M(OljS!G^x<9LXC#fwvZ#4CD5D^phJfMHFAF( zyt+e*)T>uGMwt>d3hb!AfWOYnsh|acADrxH$fm*0j|Dq437A2ovJ@%7?A`^8qjP6r zdtt5Wl#bU1PQE@^iKRdmg+6dT5LlqckOFz~ELgBy*Ym00r|#k!T8xyO9o8ZMT3sjr zh5<3`#haI4#{y^H2oZ|osvZ~%i-1@ECUTin)=kQLN_ABf)`3V_t*=?=aCD zFlLOG6f?Nuz<9dtCIu;@h*kjzzHp$=5HGaG00K9RL*X*ZkdVM08(=bx0*+V#$PsJI zP>XI3I8aM1_AgcV8{;M@QRs1gDXz`W6l3d}&zf*(7SQ3Nsu#9{>p#LSSQ zD+02pi!h<|!pR3iuoeIVII4mI3Oja?gbGf`(ZUx-V3GzFXar!u5F7yL3LybHV8JP( z81N20@7;n81$^Wvh8QTM5&|n@I3^PEbBOY-?3a->b$|BNOL%{%j#1M^+U#4rQ4P&;^4k9r8qKO_S zFoA^|Fb}&L7za%nA#u9i?0TQ(;*$5zGq%dG1 zln?+84fS=A1k5(@;KI}{_{f9J>pT%gAe$_(P6SK1k%6s4II@jCUYK}TLdEI@X*E^g9xFB43?B}!WYN*gGCGs++x5BFAR~x7;8AN#{v&P;5!K&@F4sf zeiXsP10!_sMjcuNg1QJ>?9#(A&)~}d8HE%w`w)$c!3Yb;wIDtTZFFG1Ify*+KpulE zPlXmTh@eIdXDBj#*fCHLfC6MFpuG|~;J^@sa0VlM;S0bhKmn-0!1YOB0#IOJ0iYm1 zGo0ZBi0A>>@I`?(1t0+ZD@5&vkbo=vKz%TPK_2p81PQF;7nw*z7!*+nONhV>C4j^k zWYB{H@PZo+h{2@)oPz;0wCNVvD})4S)4~Z%00^1r$2Ej7Lmk9V4LGbpH+B()>G^{O zNQeO+7=Qr=m=Oa-{9piLfQ~cx;1@u6LL!7PjY$N;iZ(Pu7Q1l*L-ddrOJIRJXhi`A zP~eb-BqJIbK!Zyx;0M#7q8;&A!4l+hQN0S|+F9u`Z`$}{XDlLv@^KWM=MB)}mCedq%pf=NtbiX)gAXutzDQHE|TfFJB& z13ONzfNorn9xXUPF8xsfEHt1L&4@t;f(d|fn)93h@Wd>T;E#LI;|kQo1STMH0yYSu z2--XbFZ{8K1YWw~o2c-FC(BGe1Hpva3Tz%aEt>S;}{X}06)2b z1r{^_pauOUJG)uuYNpaB5@JBQy_RR910 literal 0 HcwPel00001 diff --git a/extensions/help/resources/skin/modern/home.gif b/extensions/help/resources/skin/modern/home.gif new file mode 100644 index 0000000000000000000000000000000000000000..6043cee8005aeadebf098fa769e8308a37f3c797 GIT binary patch literal 2222 zcwPan2vPS(Nk%w1VJZM80QUd@LQGb9iJ7v#%2ZuuX>xq>^!A;sy6W!nXnBbxD>re0 zk*>PNTx4vx!p*tF&!Vutc7>L1evakp?!d~_QDSw|+T($do;*WLYjuFm*59kR#MRv7 zzR1%3{r$qs*0jLPl%J}sxW$>Kw93=mp{=^d(b@U>`%`6jrnJGYyT?miaoyzXw7$yB z)ZJcgfHFEnj-095;_6vxeMeAOo~gFk;N{WR-K)04yvEVQ&DYS_;MCjVevO^k;OMr( z&6cFG)!gFk@ba3fxUjp&y2a3AZh7?f_@J)5*4^cjpss+9p0vQq;O6R#nyH7Cr94Vn z-Q?@V&e({Tq@1g{vcAdQ8!cM(AeUNn5IirV6M5vskXz%(b}@T$->IihLoYb$kR_*WiB;A*x%?@XnVK9&T4v$ zv%t%#w85sbzofFiq_DhXb%)&I=g`;SZF-B#)7#0?*}uutzR1vZe~5X9nObXp`uqG^ zW^!9-de+?L&DP(^(%Z<<*}}`!{{a7)sJCNug-%;+gpr_hg_B%reBI;gvAxOb^#9!B z>)hh%+u`Zj;ON-j=dirU+TrQg-siBr$3+~exr&~JZ_*x%-{zRJPO)n|B#v%lBhc3zncUSRL!Zs;gI~ONojliu6>rg*+b}3NUWlwk|~& zbsJJa79drsWXbB0iWRCGt%W+a+baXppX4gn4xaN%(9LC>8Vs#y7cMlg#u{m0qQff{oY$LgT&R*tX;%zDKopz2CI|~dz`%zEQYayX6#gX9&3_0? zz)T*Qv;c<=JM>mT1-zlx11%g-lTSF$MW@FCFd$F>8=e1Ou%3lxNL27FkIkimhA z99Y2yt)Suo0SsUh9flz^fj|cxkXb+w5>#OU85Z!+Mi*P~5RC&kOn^lr#bl7dihBZs z$`LbwpyL9&)Nv@Hl$6P66=W#?!9xJO{PKq-!4TrZ8OCVBsi%wVsR}I?ToBuA$f#-p zq8+rlXrnN+5dZ`V`~rp-BBT&Z1DdATLJJwZvVkg>L@>Z~)u~zl8YWOei3vuSaexH3 zI0Az-3Pey&9AJd8K1>{_S89^LCj5|6kQ4RuDc=E{$ z0X%?03cEU~i6h`9xJe~NTsMU}^AID!0S5rV4m&ht!Ali8w6Mf5iIm~OCx7&E#1#PZ zip4(rn3IMM=d>`6AN%$H_lqJ-Xnl_o(n8Qo4H=X`g(tJPFbM!#1Yp1+>9F9-9yvr2 z#gpM~@XH12^p}JJ8`Pjk72LGZ3%*3`;D|6(%p#5qfouVW6YumB#s@^;;z15MV3CK4 z6(n&1C?diTN(O8I;SMhl;2VJhEeJCPKa&JYr!1}Ai0E>;w-W^r&!vwe?075Xp5e|We1)$>tK4^dg1VKttHsF*EAmtSp z0f0ZmK@_s1-6R3nJxosF2>q~y22!90LO=r=g7~E{g&B=seqaGg_{0_x@Pa3JAr4+} z!ygi0Nf{(z3YzQ(3c|2}RdnzJzZ8Ht$4O2BSfdsx=tmnw;RP_f;17S;f*YKX2q$3k z9S`Wo6?8d^hiOUKnF@tQn;cPt4P5DzMz3AG(i#&fB+A)@D2mK;~huH=RU&_ zf(7`qpdcNnD^`)vIm{spctF7ws?m>rJRqNkxB?1nfd>urGX*3KsZI}?&;^)O11PnH wEl@zznc^V~HeEmpaJq_r>Qtu)U8+w*0Msy8)v6i@K|hs>Q&%{3paB5@JImNzHvj+t literal 0 HcwPel00001 diff --git a/extensions/irc/ff/jar.mn b/extensions/irc/ff/jar.mn index cb1a16b..f50a69a 100644 --- a/extensions/irc/ff/jar.mn +++ b/extensions/irc/ff/jar.mn @@ -1,4 +1,4 @@ -# The registation of the overlays specific to Firefox below should match +# 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/ diff --git a/extensions/irc/locales/generic/install.rdf b/extensions/irc/locales/generic/install.rdf index b1a6f0e..c61052d 100644 --- a/extensions/irc/locales/generic/install.rdf +++ b/extensions/irc/locales/generic/install.rdf @@ -73,7 +73,7 @@ songbird@songbirdnest.com 0.5pre - 0.5.* + 0.6pre diff --git a/extensions/irc/sm/jar.mn b/extensions/irc/sm/jar.mn index 080a4e8..eabf92c 100644 --- a/extensions/irc/sm/jar.mn +++ b/extensions/irc/sm/jar.mn @@ -1,4 +1,4 @@ -# The registation of the overlays specific to SeaMonkey below should match +# 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/ diff --git a/extensions/irc/xpi/resources/install.rdf b/extensions/irc/xpi/resources/install.rdf index 0b2d6f8..6dcee58 100644 --- a/extensions/irc/xpi/resources/install.rdf +++ b/extensions/irc/xpi/resources/install.rdf @@ -56,7 +56,7 @@ songbird@songbirdnest.com 0.5pre - 0.5.* + 0.6pre diff --git a/extensions/irc/xul/content/config.js b/extensions/irc/xul/content/config.js index 0f43590..30a98fc 100755 --- a/extensions/irc/xul/content/config.js +++ b/extensions/irc/xul/content/config.js @@ -904,6 +904,7 @@ function PrefWindow() this.tooltipShowing = false; this.tooltipShowDelay = 1000; this.tooltipHideDelay = 20000; + this.tooltipBug418798 = false; } PrefWindow.prototype.TYPE = "PrefWindow"; @@ -1309,9 +1310,22 @@ function pwin_onTooltipPopupShowing(popup) ttt.firstChild.nodeValue = this.tooltipTitle; var ttl = document.getElementById("czPrefTipLabel"); ttl.firstChild.nodeValue = this.tooltipText; - - popup.sizeTo(popup.boxObject.width, fChild.boxObject.height + diff); - + + /* In Gecko 1.9, the popup has done no layout at this point, unlike in + * earlier versions. As a result, the box object of all the elements + * within it are 0x0. It also means the height of the labels isn't + * updated. To deal with this, we avoid calling sizeTo with the box + * object (as it's 0) and instead just force the popup height to 0 - + * otherwise it will only ever get bigger each time, never smaller. + */ + if (popup.boxObject.width == 0) + this.tooltipBug418798 = true; + + if (this.tooltipBug418798) + popup.height = 0; + else + popup.sizeTo(popup.boxObject.width, fChild.boxObject.height + diff); + return true; } diff --git a/extensions/irc/xul/content/handlers.js b/extensions/irc/xul/content/handlers.js index de53523..2cde9d6 100644 --- a/extensions/irc/xul/content/handlers.js +++ b/extensions/irc/xul/content/handlers.js @@ -685,7 +685,7 @@ function onInputCompleteLine(e) /* color codes */ if (client.prefs["outgoing.colorCodes"]) e.line = replaceColorCodes(e.line); - client.sayToCurrentTarget (e.line); + client.sayToCurrentTarget(e.line, true); } } diff --git a/extensions/irc/xul/content/menus.js b/extensions/irc/xul/content/menus.js index 19a92a4..5fd1562 100644 --- a/extensions/irc/xul/content/menus.js +++ b/extensions/irc/xul/content/menus.js @@ -79,7 +79,7 @@ function initMenus() params.sourceWindow = window; params.source = "menu"; - dispatch(commandName, params); + dispatch(commandName, params, true); delete client.menuManager.cx; }; diff --git a/extensions/irc/xul/content/output-base.css b/extensions/irc/xul/content/output-base.css index 31fab3f..a500a31 100644 --- a/extensions/irc/xul/content/output-base.css +++ b/extensions/irc/xul/content/output-base.css @@ -502,7 +502,9 @@ a.chatzilla-link:hover { .msg-data { /* .msg-data = the text portion */ padding: 1px 1px 1px 3px; /* of a message */ width: 100%; + /* need to set this twice for back+forward compat, see bug 418543 */ white-space: -moz-pre-wrap; + white-space: pre-wrap; } diff --git a/extensions/irc/xul/content/prefs.js b/extensions/irc/xul/content/prefs.js index aa360dc..5fed4e1 100644 --- a/extensions/irc/xul/content/prefs.js +++ b/extensions/irc/xul/content/prefs.js @@ -792,6 +792,8 @@ function onPrefChanged(prefName, newValue, oldValue) case "timestamps": case "timestamps.display": + case "collapseActions": + case "collapseMsgs": client.dispatch("sync-timestamp"); break; @@ -879,6 +881,8 @@ function onNetworkPrefChanged(network, prefName, newValue, oldValue) case "timestamps": case "timestamps.display": + case "collapseActions": + case "collapseMsgs": network.dispatch("sync-timestamp"); break; @@ -943,6 +947,8 @@ function onChannelPrefChanged(channel, prefName, newValue, oldValue) case "timestamps": case "timestamps.display": + case "collapseActions": + case "collapseMsgs": channel.dispatch("sync-timestamp"); break; @@ -988,6 +994,8 @@ function onUserPrefChanged(user, prefName, newValue, oldValue) case "timestamps": case "timestamps.display": + case "collapseActions": + case "collapseMsgs": user.dispatch("sync-timestamp"); break; @@ -1030,6 +1038,8 @@ function onDCCUserPrefChanged(user, prefName, newValue, oldValue) case "timestamps": case "timestamps.display": + case "collapseActions": + case "collapseMsgs": view.dispatch("sync-timestamp"); break; diff --git a/extensions/irc/xul/content/static.js b/extensions/irc/xul/content/static.js index a4abb16..d7ab982 100644 --- a/extensions/irc/xul/content/static.js +++ b/extensions/irc/xul/content/static.js @@ -24,6 +24,7 @@ * Robert Ginda, , original author * Chiaki Koufugata chiaki@mozilla.gr.jp UI i18n * Samuel Sieb, samuel@sieb.net, MIRC color codes, munger menu, and various + * James Ross, silver@warwickcompsoc.co.uk * * 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 @@ -3723,18 +3724,18 @@ function cli_load(url, scope) } client.sayToCurrentTarget = -function cli_say(msg) +function cli_say(msg, isInteractive) { if ("say" in client.currentObject) { - client.currentObject.dispatch("say", {message: msg}); + client.currentObject.dispatch("say", {message: msg}, isInteractive); return; } switch (client.currentObject.TYPE) { case "IRCClient": - dispatch("eval", {expression: msg}); + dispatch("eval", {expression: msg}, isInteractive); break; default: diff --git a/extensions/schema-validation/src/nsSchemaValidator.cpp b/extensions/schema-validation/src/nsSchemaValidator.cpp index e73acda..f9c6c65 100644 --- a/extensions/schema-validation/src/nsSchemaValidator.cpp +++ b/extensions/schema-validation/src/nsSchemaValidator.cpp @@ -2656,15 +2656,13 @@ nsSchemaValidator::IsValidSchemaDate(const nsAString & aNodeValue, /* http://www.w3.org/TR/xmlschema-2/#date - (-)CCYY-MM-DDT - then either: Z - or [+/-]hh:mm + (-)CCYY-MM-DD + then optionally either: + Z + or [+/-]hh:mm */ - // append 'T' to end to make ParseSchemaDate happy. - dateString.Append('T'); - - isValid = nsSchemaValidatorUtils::ParseSchemaDate(dateString, aResult); + isValid = nsSchemaValidatorUtils::ParseSchemaDate(dateString, PR_TRUE, aResult); return isValid; } diff --git a/extensions/schema-validation/src/nsSchemaValidatorUtils.cpp b/extensions/schema-validation/src/nsSchemaValidatorUtils.cpp index 3f61db1..040582d 100644 --- a/extensions/schema-validation/src/nsSchemaValidatorUtils.cpp +++ b/extensions/schema-validation/src/nsSchemaValidatorUtils.cpp @@ -170,9 +170,11 @@ nsSchemaValidatorUtils::ParseDateTime(const nsAString & aNodeValue, // if no T, invalid if (findString >= 0) { - isValid = ParseSchemaDate(Substring(aNodeValue, 0, findString+1), &aResult->date); + // we get the date part (from 0 to before 'T') + isValid = ParseSchemaDate(Substring(aNodeValue, 0, findString), PR_FALSE, &aResult->date); if (isValid) { + // we get the time part (from after the 'T' till the end) isValid = ParseSchemaTime( Substring(aNodeValue, findString + 1, aNodeValue.Length()), &aResult->time); @@ -184,13 +186,16 @@ nsSchemaValidatorUtils::ParseDateTime(const nsAString & aNodeValue, PRBool nsSchemaValidatorUtils::ParseSchemaDate(const nsAString & aStrValue, + PRBool aAllowTimeZone, nsSchemaDate *aDate) { PRBool isValid = PR_FALSE; /* http://www.w3.org/TR/xmlschema-2/#date - (-)CCYY-MM-DDT + (-)CCYY-MM-DD + then optionally: Z + or [+/-]hh:mm */ const PRUnichar *start, *end, *buffStart; @@ -204,6 +209,8 @@ nsSchemaValidatorUtils::ParseSchemaDate(const nsAString & aStrValue, nsAutoString year; char month[3] = ""; char day[3] = ""; + char timezoneHour[3] = ""; + char timezoneMinute[3] = ""; // if year is negative, skip it if (aStrValue.First() == '-') { @@ -261,10 +268,24 @@ nsSchemaValidatorUtils::ParseSchemaDate(const nsAString & aStrValue, // day if (buffLength > 2) { done = PR_TRUE; - } else if (currentChar == 'T') { - if ((start == end) && (buffLength == 2) && (strcmp(day, "31") < 1)) + } else if (currentChar == 'Z') { + if (aAllowTimeZone) { + if ((start == end) && (buffLength == 2) && (strcmp(day, "31") < 1)) { isValid = PR_TRUE; + } + } + done = PR_TRUE; + } else if ((currentChar == '+') || (currentChar == '-')) { + // timezone + if (aAllowTimeZone) { + state = 3; + buffLength = 0; + buffStart = start; + } else { + // no timezones allowed + done = PR_TRUE; + } } else { // has to be a numerical character or else abort if ((currentChar > '9') || (currentChar < '0')) @@ -273,10 +294,26 @@ nsSchemaValidatorUtils::ParseSchemaDate(const nsAString & aStrValue, day[buffLength] = currentChar; } buffLength++; + + // are we at the end? + if (start == end && buffLength == 2) { + isValid = PR_TRUE; + done = PR_TRUE; + } } break; } + case 3: { + // timezone hh:mm + if (end-buffStart == 5) { + isValid = ParseSchemaTimeZone(Substring(buffStart, end), timezoneHour, + timezoneMinute); + } + + done = PR_TRUE; + break; + } } } diff --git a/extensions/schema-validation/src/nsSchemaValidatorUtils.h b/extensions/schema-validation/src/nsSchemaValidatorUtils.h index 0df0ecc..0cafeb7 100644 --- a/extensions/schema-validation/src/nsSchemaValidatorUtils.h +++ b/extensions/schema-validation/src/nsSchemaValidatorUtils.h @@ -182,7 +182,9 @@ public: static PRBool ParseDateTime(const nsAString & aNodeValue, nsSchemaDateTime *aResult); - static PRBool ParseSchemaDate(const nsAString & aStrValue, nsSchemaDate *aDate); + static PRBool ParseSchemaDate(const nsAString & aStrValue, + PRBool aAllowTimeZone, + nsSchemaDate *aDate); static PRBool ParseSchemaTime(const nsAString & aStrValue, nsSchemaTime *aTime); static PRBool ParseSchemaTimeZone(const nsAString & aStrValue, diff --git a/extensions/schema-validation/tests/schema.html b/extensions/schema-validation/tests/schema.html index 4346edb..c1b2771 100644 --- a/extensions/schema-validation/tests/schema.html +++ b/extensions/schema-validation/tests/schema.html @@ -468,6 +468,8 @@ validate("-2004-02-28T12:21:03.434Z", "datetime-test-1", true); validate("-2004-02-28T12:21:03-04:00", "datetime-test-1", true); validate("-2004-02-30T12:21:03Z", "datetime-test-1", false); + validate("2004-02-28ZT24:21:03Z", "datetime-test-1", false); + validate("2004-02-28+06:00T24:21:03Z", "datetime-test-1", false); validate("2004-02-11T12:21:03Z", "datetime-test-2", true); validate("2004-02-18T00:00:00Z", "datetime-test-2", true); @@ -501,6 +503,15 @@ // leap year test validate("2000-02-29", "date-test-1", true); validate("2001-02-29", "date-test-1", false); + // timezone test + validate("2001-01-18Z", "date-test-1", true); + validate("2001-01-18A", "date-test-1", false); + validate("2001-01-18Z2", "date-test-1", false); + validate("2007-01-01-06:00", "date-test-1", true); + validate("2007-01-01+06:00", "date-test-1", true); + validate("2007-01-01A06:00", "date-test-1", false); + validate("2007-01-01-06:00Z", "date-test-1", false); + validate("2007-01-01Z-06:00", "date-test-1", false); validate("2004-02-17", "date-test-2", true); validate("2004-02-18", "date-test-2", false); diff --git a/extensions/venkman/locales/en-US/chrome/venkman.properties b/extensions/venkman/locales/en-US/chrome/venkman.properties index 0503c54..cf0b2d0 100644 --- a/extensions/venkman/locales/en-US/chrome/venkman.properties +++ b/extensions/venkman/locales/en-US/chrome/venkman.properties @@ -58,7 +58,7 @@ # character set to convert unicode messages to before writing them to a # profile report, or generated help text. msg.report.charset = utf-8 -msg.locale.version = 0.9.87.2 +msg.locale.version = 0.9.87.3 msn.bad.locale = This version of Venkman is meant to work with a ``%1$S'' locale, but you are currently using a locale marked ``%2$S''. Chances are, you're going to have problems. Please change to the default locale, or upgrade your language pack. msg.release.url = http://www.mozilla.org/releases/ diff --git a/extensions/venkman/resources/content/contents.rdf b/extensions/venkman/resources/content/contents.rdf index 34f0ce7..7ee42d4 100644 --- a/extensions/venkman/resources/content/contents.rdf +++ b/extensions/venkman/resources/content/contents.rdf @@ -50,7 +50,7 @@ diff --git a/extensions/venkman/resources/content/venkman-output-base.css b/extensions/venkman/resources/content/venkman-output-base.css index 0d0a00e..cc39ab9 100644 --- a/extensions/venkman/resources/content/venkman-output-base.css +++ b/extensions/venkman/resources/content/venkman-output-base.css @@ -54,7 +54,9 @@ a.venkman-link:hover { .msg { /* .msg = a single message in the */ width: 100%; /* output window */ font: 11pt lucida, sans-serif; + /* need to set this twice for back+forward compat, see bug 418543 */ white-space: -moz-pre-wrap; + white-space: pre-wrap; } .msg[monospace] { diff --git a/extensions/venkman/resources/content/venkman-static.js b/extensions/venkman/resources/content/venkman-static.js index bc99c47..1e031cc 100644 --- a/extensions/venkman/resources/content/venkman-static.js +++ b/extensions/venkman/resources/content/venkman-static.js @@ -40,7 +40,7 @@ #filter substitution const __vnk_version = "@VENKMAN_VERSION@"; -const __vnk_requiredLocale = "0.9.87.2"; +const __vnk_requiredLocale = "0.9.87.3"; var __vnk_versionSuffix = ""; const __vnk_counter_url = diff --git a/extensions/venkman/version.txt b/extensions/venkman/version.txt index 35629e3..c8d5522 100644 --- a/extensions/venkman/version.txt +++ b/extensions/venkman/version.txt @@ -1 +1 @@ -0.9.87.2 \ No newline at end of file +0.9.87.3 diff --git a/extensions/venkman/xpi/resources/install.rdf b/extensions/venkman/xpi/resources/install.rdf index c4f947c..a2bf605 100644 --- a/extensions/venkman/xpi/resources/install.rdf +++ b/extensions/venkman/xpi/resources/install.rdf @@ -31,7 +31,7 @@ {a463f10c-3994-11da-9945-000d60ca027b} 0.4 - 1.0.* + 1.3.* -- 2.11.4.GIT