landing CHATZILLA_COMMANDS_YOU branch, see bug 210744. a=asa

This commit is contained in:
rginda%netscape.com 2003-08-18 21:35:33 +00:00
Родитель 8336210264
Коммит fa359690d1
38 изменённых файлов: 8009 добавлений и 4720 удалений

Просмотреть файл

@ -6,6 +6,10 @@ chatzilla.jar:
content/chatzilla/lib/js/events.js (js/lib/events.js)
content/chatzilla/lib/js/connection-xpcom.js (js/lib/connection-xpcom.js)
content/chatzilla/lib/js/command-manager.js (js/lib/command-manager.js)
content/chatzilla/lib/js/command-manager.js (js/lib/command-manager.js)
content/chatzilla/lib/js/pref-manager.js (js/lib/pref-manager.js)
content/chatzilla/lib/js/message-manager.js (js/lib/message-manager.js)
content/chatzilla/lib/js/menu-manager.js (js/lib/menu-manager.js)
content/chatzilla/lib/js/irc.js (js/lib/irc.js)
content/chatzilla/lib/js/irc-debug.js (js/lib/irc-debug.js)
content/chatzilla/lib/js/file-utils.js (js/lib/file-utils.js)
@ -14,10 +18,13 @@ chatzilla.jar:
content/chatzilla/scripts.xul (xul/content/scripts.xul)
content/chatzilla/menus.xul (xul/content/menus.xul)
content/chatzilla/popups.xul (xul/content/popups.xul)
content/chatzilla/outputwindow.html (xul/content/outputwindow.html)
content/chatzilla/output-window.html (xul/content/output-window.html)
content/chatzilla/output-window.js (xul/content/output-window.js)
content/chatzilla/commands.js (xul/content/commands.js)
content/chatzilla/handlers.js (xul/content/handlers.js)
content/chatzilla/readprefs.js (xul/content/readprefs.js)
content/chatzilla/prefs.js (xul/content/prefs.js)
content/chatzilla/messages.js (xul/content/messages.js)
content/chatzilla/menus.js (xul/content/menus.js)
content/chatzilla/static.js (xul/content/static.js)
content/chatzilla/rdf.js (xul/content/rdf.js)
content/chatzilla/dynamic.css (xul/content/dynamic.css)
@ -62,10 +69,9 @@ chatzilla.jar:
skin/modern/chatzilla/images/face-smile.gif (xul/skin/images/face-smile.gif)
skin/modern/chatzilla/images/face-dunno.gif (xul/skin/images/face-dunno.gif)
skin/modern/chatzilla/images/face-surprise.gif (xul/skin/images/face-surprise.gif)
skin/modern/chatzilla/images/is-op.gif (xul/skin/images/is-op.gif)
skin/modern/chatzilla/images/isnt-op.gif (xul/skin/images/isnt-op.gif)
skin/modern/chatzilla/images/is-voice.gif (xul/skin/images/is-voice.gif)
skin/modern/chatzilla/images/isnt-voice.gif (xul/skin/images/isnt-voice.gif)
skin/modern/chatzilla/images/is-nada.png (xul/skin/images/is-nada.png)
skin/modern/chatzilla/images/is-op.png (xul/skin/images/is-op.png)
skin/modern/chatzilla/images/is-voice.png (xul/skin/images/is-voice.png)
skin/modern/chatzilla/images/taskbar-irc.gif (xul/skin/images/taskbar-irc.gif)
skin/modern/chatzilla/images/chatzilla-16.gif (xul/skin/images/chatzilla-16.gif)
skin/modern/chatzilla/images/multiline-expand.png (xul/skin/images/multiline-expand.png)

Просмотреть файл

@ -137,7 +137,8 @@ function (contentType, command, windowTarget, request)
args.url = channel.URI.spec;
w.openDialog("chrome://chatzilla/content/chatzilla.xul", "_blank",
"chrome,menubar,toolbar,resizable,dialog=no", args);
"chrome,menubar,toolbar,status,resizable,dialog=no",
args);
}
}

Просмотреть файл

@ -21,62 +21,822 @@
* Robert Ginda, rginda@ndcico.com, original author
*/
function CCommandManager ()
function getAccessKey (str)
{
this.commands = new Array();
var i = str.indexOf("&");
if (i == -1)
return "";
return str[i + 1];
}
CCommandManager.prototype.add =
function cmgr_add (name, func, usage, help)
function CommandRecord (name, func, usage, help, label, flags, keystr, tip,
format)
{
function compare (a, b)
this.name = name;
this.func = func;
this._usage = usage;
this.scanUsage();
this.help = help;
this.label = label ? label : name;
this.format = format;
this.labelstr = label.replace ("&", "");
this.tip = tip;
this.flags = flags;
this._enabled = true;
this.keyNodes = new Array();
this.keystr = keystr;
this.uiElements = new Array();
}
CommandRecord.prototype.__defineGetter__ ("enabled", cr_getenable);
function cr_getenable ()
{
return this._enabled;
}
CommandRecord.prototype.__defineSetter__ ("enabled", cr_setenable);
function cr_setenable (state)
{
for (var i = 0; i < this.uiElements.length; ++i)
{
if (a.name == b.name)
return 0;
if (state)
this.uiElements[i].removeAttribute ("disabled");
else
if (a.name > b.name)
return 1;
else
return -1;
this.uiElements[i].setAttribute ("disabled", "true");
}
return (this._enabled = state);
}
CommandRecord.prototype.__defineSetter__ ("usage", cr_setusage);
function cr_setusage (usage)
{
this._usage = usage;
this.scanUsage();
}
CommandRecord.prototype.__defineGetter__ ("usage", cr_getusage);
function cr_getusage()
{
return this._usage;
}
/**
* Internal use only.
*
* Scans the argument spec, in the format "<a1> <a2> [<o1> <o2>]", into an
* array of strings.
*/
CommandRecord.prototype.scanUsage =
function cr_scanusage()
{
var spec = this._usage;
var currentName = "";
var inName = false;
var len = spec.length;
var capNext = false;
this._usage = spec;
this.argNames = new Array();
for (var i = 0; i < len; ++i)
{
switch (spec[i])
{
case '[':
this.argNames.push (":");
break;
case '<':
inName = true;
break;
case '-':
capNext = true;
break;
case '>':
inName = false;
this.argNames.push (currentName);
currentName = "";
capNext = false;
break;
default:
if (inName)
currentName += capNext ? spec[i].toUpperCase() : spec[i];
capNext = false;
break;
}
}
}
/**
* Returns the command formatted for presentation as part of online
* documentation.
*/
CommandRecord.prototype.getDocumentation =
function cr_getdocs(flagFormatter)
{
var str;
str = getMsg(MSG_DOC_COMMANDLABEL,
[this.label.replace("&", ""), this.name]) + "\n";
str += getMsg(MSG_DOC_KEY, this.keystr ? this.keystr : MSG_VAL_NA) + "\n";
str += getMsg(MSG_DOC_SYNTAX, [this.name, this.usage]) + "\n";
str += MSG_DOC_NOTES + "\n";
str += (flagFormatter ? flagFormatter(this.flags) : this.flags) + "\n\n";
str += MSG_DOC_DESCRIPTION + "\n";
str += wrapText(this.help, 75) + "\n";
return str;
}
CommandRecord.prototype.argNames = new Array();
function CommandManager (defaultBundle)
{
this.commands = new Object();
this.defaultBundle = defaultBundle;
}
CommandManager.prototype.defaultFlags = 0;
CommandManager.prototype.defineCommands =
function cmgr_defcmds (cmdary)
{
var len = cmdary.length;
var commands = new Object();
var bundle = "stringBundle" in cmdary ? cmdary.stringBundle : null;
for (var i = 0; i < len; ++i)
{
var name = cmdary[i][0];
var func = cmdary[i][1];
var flags = cmdary[i][2];
var usage;
if (3 in cmdary[i])
usage = cmdary[i][3];
var command = this.defineCommand(name, func, flags, usage, bundle);
commands[name] = command;
}
return commands;
}
CommandManager.prototype.defineCommand =
function cmdmgr_defcmd (name, func, flags, usage, bundle)
{
if (!bundle)
bundle = this.defaultBundle;
var helpDefault;
var labelDefault = name;
var aliasFor;
if (typeof flags != "number")
flags = this.defaultFlags;
if (flags & CMD_NO_HELP)
helpDefault = MSG_NO_HELP;
if (typeof usage != "string")
usage = getMsgFrom(bundle, "cmd." + name + ".params", null, "");
if (typeof func == "string")
{
var ary = func.match(/(\S+)/);
if (ary)
aliasFor = ary[1];
else
aliasFor = null;
helpDefault = getMsg (MSG_DEFAULT_ALIAS_HELP, func);
if (aliasFor)
labelDefault = getMsgFrom (bundle, "cmd." + aliasFor + ".label",
null, name);
}
this.commands.push ({name: name, func: func, usage: usage, help: help});
this.commands = this.commands.sort(compare);
var label = getMsgFrom(bundle, "cmd." + name + ".label", null,
labelDefault);
var help = getMsgFrom(bundle, "cmd." + name + ".help", null,
helpDefault);
var keystr = getMsgFrom (bundle, "cmd." + name + ".key", null, "");
var format = getMsgFrom (bundle, "cmd." + name + ".format", null, null);
var tip = getMsgFrom (bundle, "cmd." + name + ".tip", null, "");
var command = new CommandRecord (name, func, usage, help, label, flags,
keystr, tip, format);
this.addCommand(command);
if (aliasFor)
command.aliasFor = aliasFor;
return command;
}
CCommandManager.prototype.list =
function cmgr_list (partialName)
CommandManager.prototype.installKeys =
function cmgr_instkeys (document, commands)
{
var parentElem = document.getElementById("dynamic-keys");
if (!parentElem)
{
parentElem = document.createElement("keyset");
parentElem.setAttribute ("id", "dynamic-keys");
document.firstChild.appendChild (parentElem);
}
if (!commands)
commands = this.commands;
for (var c in commands)
this.installKey (parentElem, commands[c]);
}
/**
* Create a <key> node relative to a DOM node. Usually called once per command,
* per document, so that accelerator keys work in all application windows.
*
* @param parentElem A reference to the DOM node which should contain the new
* <key> node.
* @param command reference to the CommandRecord to install.
*/
CommandManager.prototype.installKey =
function cmgr_instkey (parentElem, command)
{
if (!command.keystr)
return;
var ary = command.keystr.match (/(.*\s)?([\S]+)$/);
if (!ASSERT(ary, "couldn't parse key string ``" + command.keystr +
"'' for command ``" + command.name + "''"))
{
return;
}
var key = document.createElement ("key");
key.setAttribute ("id", "key:" + command.name);
key.setAttribute ("oncommand", "dispatch('" + command.name +
"', {isInteractive: true});");
key.setAttribute ("modifiers", ary[1]);
if (ary[2].indexOf("VK_") == 0)
key.setAttribute ("keycode", ary[2]);
else
key.setAttribute ("key", ary[2]);
parentElem.appendChild(key);
command.keyNodes.push(key);
}
CommandManager.prototype.uninstallKeys =
function cmgr_uninstkeys (commands)
{
if (!commands)
commands = this.commands;
for (var c in commands)
this.uninstallKey (commands[c]);
}
CommandManager.prototype.uninstallKey =
function cmgr_uninstkey (command)
{
for (var i in command.keyNodes)
{
try
{
/* document may no longer exist in a useful state. */
command.keyNodes[i].parentNode.removeChild(command.keyNodes[i]);
}
catch (ex)
{
dd ("*** caught exception uninstalling key node: " + ex);
}
}
}
/**
* Register a new command with the manager.
*/
CommandManager.prototype.addCommand =
function cmgr_add (command)
{
this.commands[command.name] = command;
}
CommandManager.prototype.removeCommands =
function cmgr_removes (commands)
{
for (var c in commands)
this.removeCommand(commands[c]);
}
CommandManager.prototype.removeCommand =
function cmgr_remove (command)
{
delete this.commands[command.name];
}
/**
* Register a hook for a particular command name. |id| is a human readable
* identifier for the hook, and can be used to unregister the hook. If you
* re-use a hook id, the previous hook function will be replaced.
* If |before| is |true|, the hook will be called *before* the command executes,
* if |before| is |false|, or not specified, the hook will be called *after*
* the command executes.
*/
CommandManager.prototype.addHook =
function cmgr_hook (commandName, func, id, before)
{
if (!ASSERT(commandName in this.commands,
"Unknown command '" + commandName + "'"))
{
return;
}
var command = this.commands[commandName];
if (before)
{
if (!("beforeHooks" in command))
command.beforeHooks = new Object();
command.beforeHooks[id] = func;
}
else
{
if (!("afterHooks" in command))
command.afterHooks = new Object();
command.afterHooks[id] = func;
}
}
CommandManager.prototype.addHooks =
function cmgr_hooks (hooks, prefix)
{
if (!prefix)
prefix = "";
for (var h in hooks)
{
this.addHook(h, hooks[h], prefix + ":" + h,
("_before" in hooks[h]) ? hooks[h]._before : false);
}
}
CommandManager.prototype.removeHooks =
function cmgr_remhooks (hooks, prefix)
{
if (!prefix)
prefix = "";
for (var h in hooks)
{
this.removeHook(h, prefix + ":" + h,
("before" in hooks[h]) ? hooks[h].before : false);
}
}
CommandManager.prototype.removeHook =
function cmgr_unhook (commandName, id, before)
{
var command = this.commands[commandName];
if (before)
delete command.beforeHooks[id];
else
delete command.afterHooks[id];
}
/**
* Return an array of all CommandRecords which start with the string
* |partialName|, sorted by |label| property.
*
* @param partialName Prefix to search for.
* @param flags logical ANDed with command flags.
* @returns array Array of matching commands, sorted by |label| property.
*/
CommandManager.prototype.list =
function cmgr_list (partialName, flags)
{
/* returns array of command objects which look like |partialName|, or
* all commands if |partialName| is not specified */
if ((typeof partialName == "undefined") ||
(String(partialName) == ""))
return this.commands;
var ary = new Array();
for (var i in this.commands)
function compare (a, b)
{
if (this.commands[i].name.indexOf(partialName) == 0)
ary.push (this.commands[i]);
a = a.labelstr.toLowerCase();
b = b.labelstr.toLowerCase();
if (a == b)
return 0;
if (a > b)
return 1;
return -1;
}
return ary;
var ary = new Array();
var commandNames = keys(this.commands);
/* a command named "eval" wouldn't show up in the result of keys() because
* eval is not-enumerable, even if overwritten. */
if ("eval" in this.commands && typeof this.commands.eval == "object")
commandNames.push ("eval");
for (var i in commandNames)
{
var name = commandNames[i];
if (!flags || (this.commands[name].flags & flags))
{
if (!partialName ||
this.commands[name].name.indexOf(partialName) == 0)
{
if (partialName &&
partialName.length == this.commands[name].name.length)
{
/* exact match */
return [this.commands[name]];
}
else
{
ary.push (this.commands[name]);
}
}
}
}
ary.sort(compare);
return ary;
}
CCommandManager.prototype.listNames =
function cmgr_listnames (partialName)
/**
* Return a sorted array of the command names which start with the string
* |partialName|.
*
* @param partialName Prefix to search for.
* @param flags logical ANDed with command flags.
* @returns array Sorted Array of matching command names.
*/
CommandManager.prototype.listNames =
function cmgr_listnames (partialName, flags)
{
var cmds = this.list(partialName);
var cmds = this.list(partialName, flags);
var cmdNames = new Array();
for (var c in cmds)
cmdNames.push (cmds[c].name);
return (cmdNames.length > 0) ? cmdNames.sort() : [];
cmdNames.sort();
return cmdNames;
}
/**
* Internal use only.
*
* Called to parse the arguments stored in |e.inputData|, as properties of |e|,
* for the CommandRecord stored on |e.command|.
*
* @params e Event object to be processed.
*/
CommandManager.prototype.parseArguments =
function cmgr_parseargs (e)
{
var rv = this.parseArgumentsRaw(e);
//dd("parseArguments '" + e.command.usage + "' " +
// (rv ? "passed" : "failed") + "\n" + dumpObjectTree(e));
delete e.currentArgIndex;
return rv;
}
/**
* Internal use only.
*
* Don't call parseArgumentsRaw directly, use parseArguments instead.
*
* Parses the arguments stored in the |inputData| property of the event object,
* according to the format specified by the |command| property.
*
* On success this method returns true, and propery names corresponding to the
* argument names used in the format spec will be created on the event object.
* All optional parameters will be initialized to |null| if not already present
* on the event.
*
* On failure this method returns false and a description of the problem
* will be stored in the |parseError| property of the event.
*
* For example...
* Given the argument spec "<int> <word> [ <word2> <word3> ]", and given the
* input string "411 foo", stored as |e.command.usage| and |e.inputData|
* respectively, this method would add the following propertys to the event
* object...
* -name---value--notes-
* e.int 411 Parsed as an integer
* e.word foo Parsed as a string
* e.word2 null Optional parameters not specified will be set to null.
* e.word3 null If word2 had been provided, word3 would be required too.
*
* Each parameter is parsed by calling the function with the same name, located
* in this.argTypes. The first parameter is parsed by calling the function
* this.argTypes["int"], for example. This function is expected to act on
* e.unparsedData, taking it's chunk, and leaving the rest of the string.
* The default parse functions are...
* <word> parses contiguous non-space characters.
* <int> parses as an int.
* <rest> parses to the end of input data.
* <state> parses yes, on, true, 1, 0, false, off, no as a boolean.
* <toggle> parses like a <state>, except allows "toggle" as well.
* <...> parses according to the parameter type before it, until the end
* of the input data. Results are stored in an array named
* paramnameList, where paramname is the name of the parameter
* before <...>. The value of the parameter before this will be
* paramnameList[0].
*
* If there is no parse function for an argument type, "word" will be used by
* default. You can alias argument types with code like...
* commandManager.argTypes["my-integer-name"] = commandManager.argTypes["int"];
*/
CommandManager.prototype.parseArgumentsRaw =
function parse_parseargsraw (e)
{
var argc = e.command.argNames.length;
function initOptionals()
{
for (var i = 0; i < argc; ++i)
{
if (e.command.argNames[i] != ":" &&
e.command.argNames[i] != "..." &&
!(e.command.argNames[i] in e))
{
e[e.command.argNames[i]] = null;
}
if (e.command.argNames[i] == "...")
{
var paramName = e.command.argNames[i - 1];
if (paramName == ":")
paramName = e.command.argNames[i - 2];
var listName = paramName + "List";
if (!(listName in e))
e[listName] = [ e[paramName] ];
}
}
}
if ("inputData" in e && e.inputData)
{
/* if data has been provided, parse it */
e.unparsedData = e.inputData;
var parseResult;
var currentArg;
e.currentArgIndex = 0;
if (argc)
{
currentArg = e.command.argNames[e.currentArgIndex];
while (e.unparsedData)
{
if (currentArg != ":")
{
if (!this.parseArgument (e, currentArg))
return false;
}
if (++e.currentArgIndex < argc)
currentArg = e.command.argNames[e.currentArgIndex];
else
break;
}
if (e.currentArgIndex < argc && currentArg != ":")
{
/* parse loop completed because it ran out of data. We haven't
* parsed all of the declared arguments, and we're not stopped
* at an optional marker, so we must be missing something
* required... */
e.parseError = getMsg(MSG_ERR_REQUIRED_PARAM,
e.command.argNames[e.currentArgIndex]);
return false;
}
}
if (e.unparsedData)
{
/* parse loop completed with unparsed data, which means we've
* successfully parsed all arguments declared. Whine about the
* extra data... */
display (getMsg(MSG_EXTRA_PARAMS, e.unparsedData), MT_WARN);
}
}
var rv = this.isCommandSatisfied(e);
if (rv)
initOptionals();
return rv;
}
/**
* Returns true if |e| has the properties required to call the command
* |command|.
*
* If |command| is not provided, |e.command| is used instead.
*
* @param e Event object to test against the command.
* @param command Command to test.
*/
CommandManager.prototype.isCommandSatisfied =
function cmgr_isok (e, command)
{
if (typeof command == "undefined")
command = e.command;
else if (typeof command == "string")
command = this.commands[command];
if (!command.enabled)
return false;
for (var i = 0; i < command.argNames.length; ++i)
{
if (command.argNames[i] == ":")
return true;
if (!(command.argNames[i] in e))
{
e.parseError = getMsg(MSG_ERR_REQUIRED_PARAM, command.argNames[i]);
//dd("command '" + command.name + "' unsatisfied: " + e.parseError);
return false;
}
}
//dd ("command '" + command.name + "' satisfied.");
return true;
}
/**
* Internal use only.
* See parseArguments above and the |argTypes| object below.
*
* Parses the next argument by calling an appropriate parser function, or the
* generic "word" parser if none other is found.
*
* @param e event object.
* @param name property name to use for the parse result.
*/
CommandManager.prototype.parseArgument =
function cmgr_parsearg (e, name)
{
var parseResult;
if (name in this.argTypes)
parseResult = this.argTypes[name](e, name, this);
else
parseResult = this.argTypes["word"](e, name, this);
if (!parseResult)
e.parseError = getMsg(MSG_ERR_INVALID_PARAM,
[name, e.unparsedData]);
return parseResult;
}
CommandManager.prototype.argTypes = new Object();
/**
* Convenience function used to map a list of new types to an existing parse
* function.
*/
CommandManager.prototype.argTypes.__aliasTypes__ =
function at_alias (list, type)
{
for (var i in list)
{
this[list[i]] = this[type];
}
}
/**
* Internal use only.
*
* Parses an integer, stores result in |e[name]|.
*/
CommandManager.prototype.argTypes["int"] =
function parse_int (e, name)
{
var ary = e.unparsedData.match (/(\d+)(?:\s+(.*))?$/);
if (!ary)
return false;
e[name] = Number(ary[1]);
e.unparsedData = (2 in ary) ? ary[2] : "";
return true;
}
/**
* Internal use only.
*
* Parses a word, which is defined as a list of nonspace characters.
*
* Stores result in |e[name]|.
*/
CommandManager.prototype.argTypes["word"] =
function parse_word (e, name)
{
var ary = e.unparsedData.match (/(\S+)(?:\s+(.*))?$/);
if (!ary)
return false;
e[name] = ary[1];
e.unparsedData = (2 in ary) ? ary[2] : "";
return true;
}
/**
* Internal use only.
*
* Parses a "state" which can be "true", "on", "yes", or 1 to indicate |true|,
* or "false", "off", "no", or 0 to indicate |false|.
*
* Stores result in |e[name]|.
*/
CommandManager.prototype.argTypes["state"] =
function parse_state (e, name)
{
var ary =
e.unparsedData.match (/(true|on|yes|1|false|off|no|0)(?:\s+(.*))?$/i);
if (!ary)
return false;
if (ary[1].search(/true|on|yes|1/i) != -1)
e[name] = true;
else
e[name] = false;
e.unparsedData = (2 in ary) ? ary[2] : "";
return true;
}
/**
* Internal use only.
*
* Parses a "toggle" which can be "true", "on", "yes", or 1 to indicate |true|,
* or "false", "off", "no", or 0 to indicate |false|. In addition, the string
* "toggle" is accepted, in which case |e[name]| will be the string "toggle".
*
* Stores result in |e[name]|.
*/
CommandManager.prototype.argTypes["toggle"] =
function parse_toggle (e, name)
{
var ary = e.unparsedData.match
(/(toggle|true|on|yes|1|false|off|no|0)(?:\s+(.*))?$/i);
if (!ary)
return false;
if (ary[1].search(/toggle/i) != -1)
e[name] = "toggle";
else if (ary[1].search(/true|on|yes|1/i) != -1)
e[name] = true;
else
e[name] = false;
e.unparsedData = (2 in ary) ? ary[2] : "";
return true;
}
/**
* Internal use only.
*
* Returns all unparsed data to the end of the line.
*
* Stores result in |e[name]|.
*/
CommandManager.prototype.argTypes["rest"] =
function parse_rest (e, name)
{
e[name] = e.unparsedData;
e.unparsedData = "";
return true;
}
/**
* Internal use only.
*
* Parses the rest of the unparsed data the same way the previous argument was
* parsed. Can't be used as the first parameter. if |name| is "..." then the
* name of the previous argument, plus the suffix "List" will be used instead.
*
* Stores result in |e[name]| or |e[lastName + "List"]|.
*/
CommandManager.prototype.argTypes["..."] =
function parse_repeat (e, name, cm)
{
ASSERT (e.currentArgIndex > 0, "<...> can't be the first argument.");
var lastArg = e.command.argNames[e.currentArgIndex - 1];
if (lastArg == ":")
lastArg = e.command.argNames[e.currentArgIndex - 2];
var listName = lastArg + "List";
e[listName] = [ e[lastArg] ];
while (e.unparsedData)
{
if (!cm.parseArgument(e, lastArg))
return false;
e[listName].push(e[lastArg]);
}
e[lastArg] = e[listName][0];
return true;
}

Просмотреть файл

@ -159,6 +159,7 @@ function bc_disconnect()
this._inputStream.close();
if ("_outputStream" in this && this._outputStream)
this._outputStream.close();
this.isConnected = false;
/*
this._streamProvider.close();
if (this._streamProvider.isBlocked)
@ -192,8 +193,8 @@ function bc_readdata(timeout, count)
}
catch (ex)
{
dd ("*** Caught " + ex + " while reading.")
this.isConnected = false;
dd ("*** Caught " + ex + " while reading.");
this.disconnect();
throw (ex);
}
@ -249,8 +250,8 @@ function bc_senddatanow(str)
}
catch (ex)
{
dd ("*** Caught " + ex + " while sending.")
this.isConnected = false;
dd ("*** Caught " + ex + " while sending.");
this.disconnect();
throw (ex);
}

Просмотреть файл

@ -196,8 +196,19 @@ function ep_routeevent (e)
}
catch (ex)
{
dd ("Error routing event: " + dumpObjectTree(ex) +
" in " + e.destMethod + "\n" + ex);
if (typeof ex == "string")
{
dd ("Error routing event " + e.set + "." +
e.type + ": " + ex);
}
else
{
dd ("Error routing event " + e.set + "." +
e.type + ": " + dumpObjectTree(ex) +
" in " + e.destMethod + "\n" + ex);
if ("stack" in ex)
dd(ex.stack);
}
}
else
destObject[e.destMethod] (e);

Просмотреть файл

@ -67,6 +67,9 @@ const FILTER_IMAGES = Components.interfaces.nsIFilePicker.filterImages;
const FILTER_XML = Components.interfaces.nsIFilePicker.filterXML;
const FILTER_XUL = Components.interfaces.nsIFilePicker.filterXUL;
const FTYPE_DIR = Components.interfaces.nsIFile.DIRECTORY_TYPE;
const FTYPE_FILE = Components.interfaces.nsIFile.NORMAL_FILE_TYPE;
// evald f = fopen("/home/rginda/foo.txt", MODE_WRONLY | MODE_CREATE)
// evald f = fopen("/home/rginda/vnk.txt", MODE_RDONLY)
@ -218,6 +221,25 @@ function pickOpen (title, typeList, defaultFile, defaultDir)
return {reason: rv, file: picker.file, picker: picker};
}
function mkdir (localFile, perms)
{
if (typeof perms == "undefined")
perms = 0766 & ~futils.umask;
localFile.create(FTYPE_DIR, perms);
}
function nsLocalFile(path)
{
const LOCALFILE_CTRID = "@mozilla.org/file/local;1";
const nsILocalFile = Components.interfaces.nsILocalFile;
var localFile =
Components.classes[LOCALFILE_CTRID].createInstance(nsILocalFile);
localFile.initWithPath(path);
return localFile;
}
function fopen (path, mode, perms, tmp)
{
return new LocalFile(path, mode, perms, tmp);
@ -262,8 +284,7 @@ function LocalFile(file, mode, perms, tmp)
if (typeof file == "string")
{
this.localFile = classes[LOCALFILE_CTRID].createInstance(nsILocalFile);
this.localFile.initWithPath(file);
this.localFile = new nsLocalFile(file);
}
else if (file instanceof nsILocalFile)
{
@ -293,7 +314,6 @@ function LocalFile(file, mode, perms, tmp)
}
}
LocalFile.prototype.write =
function fo_write(buf)
{

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -0,0 +1,581 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is The JavaScript Debugger
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation
* Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation.
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the MPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the MPL or the GPL.
*
* Contributor(s):
* Robert Ginda, <rginda@netscape.com>, original author
*
*/
function MenuManager (commandManager, menuSpecs, contextFunction, commandStr)
{
var menuManager = this;
this.commandManager = commandManager;
this.menuSpecs = menuSpecs;
this.contextFunction = contextFunction;
this.commandStr = commandStr;
this.onPopupShowing =
function mmgr_onshow (event) { return menuManager.showPopup (event); };
this.onPopupHiding =
function mmgr_onhide (event) { return menuManager.hidePopup (event); };
}
MenuManager.prototype.appendMenuItems =
function mmgr_append(menuId, items)
{
for (var i = 0; i < items.length; ++i)
client.menuSpecs[menuId].items.push(items[i]);
}
MenuManager.prototype.createContextMenus =
function mmgr_initcxs (document)
{
for (var id in this.menuSpecs)
{
if (id.indexOf("context:") == 0)
this.createContextMenu(document, id);
}
}
MenuManager.prototype.createContextMenu =
function mmgr_initcx (document, id)
{
if (!document.getElementById(id))
{
if (!ASSERT(id in this.menuSpecs, "unknown context menu " + id))
return;
var dp = document.getElementById("dynamic-popups");
var popup = this.appendPopupMenu (dp, null, id, id);
var items = this.menuSpecs[id].items;
this.createMenuItems (popup, null, items);
}
}
MenuManager.prototype.createMenus =
function mmgr_createtb(document, menuid)
{
var menu = document.getElementById(menuid);
for (id in this.menuSpecs)
{
var domID;
if ("domID" in this.menuSpecs[id])
domID = this.menuSpecs[id].domID;
else
domID = id;
if (id.indexOf(menuid + ":") == 0)
this.createMenu(menu, null, id, domID);
}
}
MenuManager.prototype.createMainToolbar =
function mmgr_createtb(document, id)
{
var toolbar = document.getElementById(id);
var spec = client.menuSpecs[id];
for (var i in spec.items)
{
this.appendToolbarItem (toolbar, null, spec.items[i]);
}
toolbar.className = "toolbar-primary chromeclass-toolbar";
}
/**
* Internal use only.
*
* Registers event handlers on a given menu.
*/
MenuManager.prototype.hookPopup =
function mmgr_hookpop (node)
{
node.addEventListener ("popupshowing", this.onPopupShowing, false);
node.addEventListener ("popuphiding", this.onPopupHiding, false);
}
/**
* Internal use only.
*
* |showPopup| is called from the "onpopupshowing" event of menus
* managed by the CommandManager. If a command is disabled, represents a command
* that cannot be "satisfied" by the current command context |cx|, or has an
* "enabledif" attribute that eval()s to false, then the menuitem is disabled.
* In addition "checkedif" and "visibleif" attributes are eval()d and
* acted upon accordingly.
*/
MenuManager.prototype.showPopup =
function mmgr_showpop (event)
{
//dd ("showPopup {");
/* returns true if the command context has the properties required to
* execute the command associated with |menuitem|.
*/
function satisfied()
{
if (menuitem.hasAttribute("isSeparator") ||
!menuitem.hasAttribute("commandname"))
{
return true;
}
if (!("menuManager" in cx))
{
dd ("no menuManager in cx");
return false;
}
var name = menuitem.getAttribute("commandname");
var commandManager = cx.menuManager.commandManager;
var commands = commandManager.commands;
if (!ASSERT (name in commands,
"menu contains unknown command '" + name + "'"))
{
return false;
}
var rv = commandManager.isCommandSatisfied(cx, commands[name]);
delete cx.parseError;
return rv;
};
/* Convenience function for "enabledif", etc, attributes. */
function has (prop)
{
return (prop in cx);
};
/* evals the attribute named |attr| on the node |node|. */
function evalIfAttribute (node, attr)
{
var ex;
var expr = node.getAttribute(attr);
if (!expr)
return true;
expr = expr.replace (/\Wand\W/gi, " && ");
try
{
return eval("(" + expr + ")");
}
catch (ex)
{
dd ("caught exception evaling '" + node.getAttribute("id") + "'.'" +
attr + "'\n" + ex);
}
return true;
};
var cx;
var popup = event.originalTarget;
var menuitem = popup.firstChild;
/* If the host provided a |contextFunction|, use it now. Remember the
* return result as this.cx for use if something from this menu is actually
* dispatched. this.cx is deleted in |hidePopup|. */
if (typeof this.contextFunction == "function")
{
cx = this.cx = this.contextFunction (popup.getAttribute("menuName"),
event);
}
else
{
cx = this.cx = { menuManager: this, originalEvent: event };
}
do
{
/* should it be visible? */
if (menuitem.hasAttribute("visibleif"))
{
if (evalIfAttribute(menuitem, "visibleif"))
menuitem.removeAttribute ("hidden");
else
{
menuitem.setAttribute ("hidden", "true");
continue;
}
}
/* it's visible, maybe it has a dynamic label? */
if (menuitem.hasAttribute("format"))
{
var label = replaceVars(menuitem.getAttribute("format"), cx);
if (label.indexOf("\$") != -1)
label = menuitem.getAttribute("backupLabel");
menuitem.setAttribute("label", label);
}
/* ok, it's visible, maybe it should be disabled? */
if (satisfied())
{
if (menuitem.hasAttribute("enabledif"))
{
if (evalIfAttribute(menuitem, "enabledif"))
menuitem.removeAttribute ("disabled");
else
menuitem.setAttribute ("disabled", "true");
}
else
menuitem.removeAttribute ("disabled");
}
else
{
menuitem.setAttribute ("disabled", "true");
}
/* should it have a check? */
if (menuitem.hasAttribute("checkedif"))
{
if (evalIfAttribute(menuitem, "checkedif"))
menuitem.setAttribute ("checked", "true");
else
menuitem.removeAttribute ("checked");
}
} while ((menuitem = menuitem.nextSibling));
//dd ("}");
return true;
}
/**
* Internal use only.
*
* |hidePopup| is called from the "onpopuphiding" event of menus
* managed by the CommandManager. Nothing to do here anymore.
* We used to just clean up this.cx, but that's a problem for nested
* menus.
*/
MenuManager.prototype.hidePopup =
function mmgr_hidepop (id)
{
return true;
}
/**
* Appends a sub-menu to an existing menu.
* @param parentNode DOM Node to insert into
* @param beforeNode DOM Node already contained by parentNode, to insert before
* @param id ID of the sub-menu to add.
* @param label Text to use for this sub-menu. The & character can be
* used to indicate the accesskey.
* @param attribs Object containing CSS attributes to set on the element.
*/
MenuManager.prototype.appendSubMenu =
function mmgr_addsmenu (parentNode, beforeNode, menuName, domId, label, attribs)
{
var document = parentNode.ownerDocument;
/* sometimes the menu is already there, for overlay purposes. */
var menu = document.getElementById(domId);
if (!menu)
{
menu = document.createElement ("menu");
menu.setAttribute ("id", domId);
parentNode.insertBefore(menu, beforeNode);
}
var menupopup = menu.firstChild;
if (!menupopup)
{
menupopup = document.createElement ("menupopup");
menupopup.setAttribute ("id", domId + "-popup");
menu.appendChild(menupopup);
menupopup = menu.firstChild;
}
menupopup.setAttribute ("menuName", menuName);
menu.setAttribute ("accesskey", getAccessKey(label));
label = label.replace("&", "");
menu.setAttribute ("label", label);
menu.setAttribute ("isSeparator", true);
if (typeof attribs == "object")
{
for (var p in attribs)
menu.setAttribute (p, attribs[p]);
}
this.hookPopup (menupopup);
return menupopup;
}
/**
* Appends a popup to an existing popupset.
* @param parentNode DOM Node to insert into
* @param beforeNode DOM Node already contained by parentNode, to insert before
* @param id ID of the popup to add.
* @param label Text to use for this popup. Popup menus don't normally have
* labels, but we set a "label" attribute anyway, in case
* the host wants it for some reason. Any "&" characters will
* be stripped.
* @param attribs Object containing CSS attributes to set on the element.
*/
MenuManager.prototype.appendPopupMenu =
function mmgr_addpmenu (parentNode, beforeNode, menuName, id, label, attribs)
{
var document = parentNode.ownerDocument;
var popup = document.createElement ("popup");
popup.setAttribute ("id", id);
if (label)
popup.setAttribute ("label", label.replace("&", ""));
if (typeof attribs == "object")
{
for (var p in attribs)
popup.setAttribute (p, attribs[p]);
}
popup.setAttribute ("menuName", menuName);
parentNode.insertBefore(popup, beforeNode);
this.hookPopup (popup);
return popup;
}
/**
* Appends a menuitem to an existing menu or popup.
* @param parentNode DOM Node to insert into
* @param beforeNode DOM Node already contained by parentNode, to insert before
* @param command A reference to the CommandRecord this menu item will represent.
* @param attribs Object containing CSS attributes to set on the element.
*/
MenuManager.prototype.appendMenuItem =
function mmgr_addmenu (parentNode, beforeNode, commandName, attribs)
{
var menuManager = this;
var document = parentNode.ownerDocument;
if (commandName == "-")
return this.appendMenuSeparator(parentNode, beforeNode, attribs);
var parentId = parentNode.getAttribute("id");
if (!ASSERT(commandName in this.commandManager.commands,
"unknown command " + commandName + " targeted for " +
parentId))
{
return null;
}
var command = this.commandManager.commands[commandName];
var menuitem = document.createElement ("menuitem");
menuitem.setAttribute ("id", parentId + ":" + commandName);
menuitem.setAttribute ("commandname", command.name);
menuitem.setAttribute ("key", "key:" + command.name);
menuitem.setAttribute ("accesskey", getAccessKey(command.label));
var label = command.label.replace("&", "");
menuitem.setAttribute ("label", label);
if (command.format)
{
menuitem.setAttribute("format", command.format);
menuitem.setAttribute("backupLabel", label);
}
menuitem.setAttribute ("oncommand", this.commandStr);
if (typeof attribs == "object")
{
for (var p in attribs)
menuitem.setAttribute (p, attribs[p]);
}
command.uiElements.push(menuitem);
parentNode.insertBefore (menuitem, beforeNode);
return menuitem;
}
/**
* Appends a menuseparator to an existing menu or popup.
* @param parentNode DOM Node to insert into
* @param beforeNode DOM Node already contained by parentNode, to insert before
* @param attribs Object containing CSS attributes to set on the element.
*/
MenuManager.prototype.appendMenuSeparator =
function mmgr_addsep (parentNode, beforeNode, attribs)
{
var document = parentNode.ownerDocument;
var menuitem = document.createElement ("menuseparator");
menuitem.setAttribute ("isSeparator", true);
if (typeof attribs == "object")
{
for (var p in attribs)
menuitem.setAttribute (p, attribs[p]);
}
parentNode.insertBefore (menuitem, beforeNode);
return menuitem;
}
/**
* Appends a toolbaritem to an existing box element.
* @param parentNode DOM Node to insert into
* @param beforeNode DOM Node already contained by parentNode, to insert before
* @param command A reference to the CommandRecord this toolbaritem will
* represent.
* @param attribs Object containing CSS attributes to set on the element.
*/
MenuManager.prototype.appendToolbarItem =
function mmgr_addtb (parentNode, beforeNode, commandName, attribs)
{
if (commandName == "-")
return this.appendToolbarSeparator(parentNode, beforeNode, attribs);
var parentId = parentNode.getAttribute("id");
if (!ASSERT(commandName in this.commandManager.commands,
"unknown command " + commandName + " targeted for " +
parentId))
{
return null;
}
var command = this.commandManager.commands[commandName];
var document = parentNode.ownerDocument;
var tbitem = document.createElement ("toolbarbutton");
var id = parentNode.getAttribute("id") + ":" + commandName;
tbitem.setAttribute ("id", id);
tbitem.setAttribute ("class", "toolbarbutton-1");
if (command.tip)
tbitem.setAttribute ("tooltiptext", command.tip);
tbitem.setAttribute ("label", command.label.replace("&", ""));
tbitem.setAttribute ("oncommand",
"dispatch('" + commandName + "');");
if (typeof attribs == "object")
{
for (var p in attribs)
tbitem.setAttribute (p, attribs[p]);
}
command.uiElements.push(tbitem);
parentNode.insertBefore (tbitem, beforeNode);
return tbitem;
}
/**
* Appends a toolbarseparator to an existing box.
* @param parentNode DOM Node to insert into
* @param beforeNode DOM Node already contained by parentNode, to insert before
* @param attribs Object containing CSS attributes to set on the element.
*/
MenuManager.prototype.appendToolbarSeparator =
function mmgr_addmenu (parentNode, beforeNode, attribs)
{
var document = parentNode.ownerDocument;
var tbitem = document.createElement ("toolbarseparator");
tbitem.setAttribute ("isSeparator", true);
if (typeof attribs == "object")
{
for (var p in attribs)
tbitem.setAttribute (p, attribs[p]);
}
parentNode.appendChild (tbitem);
return tbitem;
}
/**
* Creates menu DOM nodes from a menu specification.
* @param parentNode DOM Node to insert into
* @param beforeNode DOM Node already contained by parentNode, to insert before
* @param menuSpec array of menu items
*/
MenuManager.prototype.createMenu =
function mmgr_newmenu (parentNode, beforeNode, menuName, domId, attribs)
{
if (typeof domId == "undefined")
domId = menuName;
if (!ASSERT(menuName in this.menuSpecs, "unknown menu name " + menuName))
return null;
var menuSpec = this.menuSpecs[menuName];
var subMenu = this.appendSubMenu (parentNode, beforeNode, menuName, domId,
menuSpec.label, attribs);
this.createMenuItems (subMenu, null, menuSpec.items);
return subMenu;
}
MenuManager.prototype.createMenuItems =
function mmgr_newitems (parentNode, beforeNode, menuItems)
{
function itemAttribs()
{
return (1 in menuItems[i]) ? menuItems[i][1] : null;
};
var parentId = parentNode.getAttribute("id");
for (var i in menuItems)
{
var itemName = menuItems[i][0];
if (itemName[0] == ">")
{
itemName = itemName.substr(1);
if (!ASSERT(itemName in this.menuSpecs,
"unknown submenu " + itemName + " referenced in " +
parentId))
{
continue;
}
this.createMenu (parentNode, beforeNode, itemName,
parentId + ":" + itemName, itemAttribs());
}
else if (itemName in this.commandManager.commands)
{
this.appendMenuItem (parentNode, beforeNode, itemName,
itemAttribs());
}
else if (itemName == "-")
{
this.appendMenuSeparator (parentNode, beforeNode, itemAttribs());
}
else
{
dd ("unknown command " + itemName + " referenced in " + parentId);
}
}
}

Просмотреть файл

@ -0,0 +1,222 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is The JavaScript Debugger
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation
* Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation.
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the MPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the MPL or the GPL.
*
* Contributor(s):
* Robert Ginda, <rginda@netscape.com>, original author
*
*/
function MessageManager()
{
const UC_CTRID = "@mozilla.org/intl/scriptableunicodeconverter";
const nsIUnicodeConverter =
Components.interfaces.nsIScriptableUnicodeConverter;
this.ucConverter =
Components.classes[UC_CTRID].getService(nsIUnicodeConverter);
this.defaultBundle = null;
this.bundleList = new Array();
}
MessageManager.prototype.addBundle =
function mm_addbundle(bundlePath, targetWindow)
{
var bundle = srGetStrBundle(bundlePath);
this.bundleList.push(bundle);
this.importBundle(bundle, targetWindow, this.bundleList.length - 1);
return bundle;
}
MessageManager.prototype.importBundle =
function mm_importbundle(bundle, targetWindow, index)
{
const nsIPropertyElement = Components.interfaces.nsIPropertyElement;
if (!targetWindow)
targetWindow = window;
if (typeof index == "undefined")
index = arrayIndexOf(this.bundleList, bundle);
var pfx;
if (index == 0)
pfx = "";
else
pfx = index + ":";
var enumer = bundle.getSimpleEnumeration();
while (enumer.hasMoreElements())
{
var prop = enumer.getNext().QueryInterface(nsIPropertyElement);
var ary = prop.key.match (/^(msg|msn)/);
if (ary)
{
var constValue;
var constName = prop.key.toUpperCase().replace (/\./g, "_");
if (ary[1] == "msn" || prop.value.search(/%(\d+\$)?s/i) != -1)
constValue = pfx + prop.key;
else
constValue = prop.value.replace (/^\"/, "").replace (/\"$/, "");
targetWindow[constName] = constValue;
}
}
if (this.bundleList.length == 1)
this.defaultBundle = bundle;
}
MessageManager.prototype.checkCharset =
function mm_checkset(charset)
{
try
{
this.ucConverter.charset = charset;
}
catch (ex)
{
return false;
}
return true;
}
MessageManager.prototype.toUnicode =
function mm_tounicode(msg, charset)
{
if (!charset)
return msg;
try
{
this.ucConverter.charset = charset;
msg = this.ucConverter.ConvertToUnicode(msg);
}
catch (ex)
{
//dd ("caught exception " + ex + " converting " + msg + " to charset " +
// charset);
}
return msg;
}
MessageManager.prototype.fromUnicode =
function mm_fromunicode(msg, charset)
{
if (!charset)
return msg;
if (charset != this.ucConverter.charset)
this.ucConverter.charset = charset;
try
{
if ("Finish" in this.ucConverter)
{
msg = this.ucConverter.ConvertFromUnicode(msg);
this.ucConverter.Finish();
}
else
{
msg = this.ucConverter.ConvertFromUnicode(msg + " ");
msg = msg.substr(0, msg.length - 1);
}
}
catch (ex)
{
//dd ("caught exception " + ex + " converting " + msg + " to charset " +
// charset);
}
return msg;
}
MessageManager.prototype.getMsg =
function mm_getmsg (msgName, params, deflt)
{
try
{
var bundle;
var ary = msgName.match (/(\d+):(.+)/);
if (ary)
{
return (this.getMsgFrom(this.bundleList[ary[1]], ary[2], params,
deflt));
}
return this.getMsgFrom(this.bundleList[0], msgName, params, deflt);
}
catch (ex)
{
ASSERT (0, "Caught exception getting message: " + msgName + "/" +
params);
return deflt ? deflt : msgName;
}
}
MessageManager.prototype.getMsgFrom =
function mm_getfrom (bundle, msgName, params, deflt)
{
try
{
var rv;
if (params && params instanceof Array)
rv = bundle.formatStringFromName (msgName, params, params.length);
else if (params || params == 0)
rv = bundle.formatStringFromName (msgName, [params], 1);
else
rv = bundle.GetStringFromName (msgName);
/* strip leading and trailing quote characters, see comment at the
* top of venkman.properties.
*/
rv = rv.replace (/^\"/, "");
rv = rv.replace (/\"$/, "");
return rv;
}
catch (ex)
{
if (typeof deflt == "undefined")
{
ASSERT (0, "caught exception getting value for ``" + msgName +
"''\n" + ex + "\n");
return msgName;
}
return deflt;
}
return null;
}

Просмотреть файл

@ -0,0 +1,383 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is The JavaScript Debugger
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation
* Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation.
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the MPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the MPL or the GPL.
*
* Contributor(s):
* Robert Ginda, <rginda@netscape.com>, original author
*
*/
const PREF_RELOAD = true;
const PREF_WRITETHROUGH = true;
function PrefManager (branchName)
{
var prefManager = this;
function pm_observe (prefService, topic, prefName)
{
var r = prefManager.prefRecords[prefName];
if (!r)
return;
var oldValue = (r.realValue != null) ? r.realValue : r.defaultValue;
r.realValue = prefManager.getPref(prefName, PREF_RELOAD);
prefManager.onPrefChanged(prefName, r.realValue, oldValue);
};
const PREF_CTRID = "@mozilla.org/preferences-service;1";
const nsIPrefService = Components.interfaces.nsIPrefService;
const nsIPrefBranch = Components.interfaces.nsIPrefBranch;
const nsIPrefBranchInternal = Components.interfaces.nsIPrefBranchInternal;
this.prefService =
Components.classes[PREF_CTRID].getService(nsIPrefService);
this.prefBranch = this.prefService.getBranch(branchName);
this.defaultValues = new Object();
this.prefs = new Object();
this.prefNames = new Array();
this.prefRecords = new Object();
this.observer = { observe: pm_observe };
this.prefBranchInternal =
this.prefBranch.QueryInterface(nsIPrefBranchInternal);
this.prefBranchInternal.addObserver("", this.observer, false);
this.valid = true;
}
PrefManager.prototype.destroy =
function pm_destroy()
{
if (this.valid)
{
this.prefBranchInternal.removeObserver("", this.observer);
this.valid = false;
}
}
PrefManager.prototype.getBranch =
function pm_getbranch(suffix)
{
return this.prefService.getBranch(this.prefBranch.root + suffix);
}
PrefManager.prototype.getBranchManager =
function pm_getbranchmgr(suffix)
{
return new PrefManager(this.prefBranch.root + suffix);
}
PrefManager.prototype.onPrefChanged =
function pm_changed(prefName, prefManager, topic)
{
/* clients can override this to hear about pref changes */
}
PrefManager.prototype.listPrefs =
function pm_listprefs (prefix)
{
var list = new Array();
var names = this.prefNames;
for (var i = 0; i < names.length; ++i)
{
if (!prefix || names[i].indexOf(prefix) == 0)
list.push (names[i]);
}
return list;
}
PrefManager.prototype.readPrefs =
function pm_readprefs ()
{
const nsIPrefBranch = Components.interfaces.nsIPrefBranch;
var list = this.prefBranch.getChildList("", {});
for (var i = 0; i < list.length; ++i)
{
if (!(list[i] in this))
{
var type = this.prefBranch.getPrefType (list[i]);
var defaultValue;
switch (type)
{
case nsIPrefBranch.PREF_INT:
defaultValue = 0;
break;
case nsIPrefBranch.PREF_BOOL:
defaultValue = false;
break;
default:
defaultValue = "";
}
this.addPref(list[i], defaultValue);
}
}
}
PrefManager.prototype.isKnownPref =
function pm_ispref(prefName)
{
return (prefName in this.prefRecords);
}
PrefManager.prototype.addPrefs =
function pm_addprefs(prefSpecs)
{
for (var i = 0; i < prefSpecs.length; ++i)
{
this.addPref(prefSpecs[i][0], prefSpecs[i][1],
2 in prefSpecs[i] ? prefSpecs[i][2] : null);
}
}
PrefManager.prototype.addDeferredPrefs =
function pm_addprefsd(targetManager, writeThrough)
{
function deferGet(prefName)
{
return targetManager.getPref(prefName);
};
function deferSet(prefName, value)
{
return targetManager.setPref(prefName, value);
};
var setter = null;
if (writeThrough)
setter = deferSet;
var prefs = targetManager.prefs;
for (var i = 0; i < prefs.length; ++i)
this.addPref(prefs[i], deferGet, setter);
}
PrefManager.prototype.updateArrayPref =
function pm_arrayupdate(prefName)
{
var record = this.prefRecords[prefName];
if (!ASSERT(record, "Unknown pref: " + prefName))
return;
if (record.realValue == null)
record.realValue = record.defaultValue;
if (!ASSERT(record.realValue instanceof Array, "Pref is not an array"))
return;
this.prefBranch.setCharPref(prefName, this.arrayToString(record.realValue));
this.prefService.savePrefFile(null);
}
PrefManager.prototype.stringToArray =
function pm_s2a(string)
{
if (string.search(/\S/) == -1)
return [];
var ary = string.split(/\s*;\s*/);
for (var i = 0; i < ary.length; ++i)
ary[i] = unescape(ary[i]);
return ary;
}
PrefManager.prototype.arrayToString =
function pm_a2s(ary)
{
var escapedAry = new Array()
for (var i = 0; i < ary.length; ++i)
escapedAry[i] = escape(ary[i]);
return escapedAry.join("; ");
}
PrefManager.prototype.getPref =
function pm_getpref(prefName, reload)
{
var prefManager = this;
function updateArrayPref() { prefManager.updateArrayPref(prefName); };
var record = this.prefRecords[prefName];
if (!ASSERT(record, "Unknown pref: " + prefName))
return null;
var defaultValue;
if (typeof record.defaultValue == "function")
{
// deferred pref, call the getter, and don't cache the result.
defaultValue = record.defaultValue(prefName);
}
else
{
if (!reload && record.realValue != null)
return record.realValue;
defaultValue = record.defaultValue;
}
var realValue = null;
try
{
if (typeof defaultValue == "boolean")
{
realValue = this.prefBranch.getBoolPref(prefName);
}
else if (typeof defaultValue == "number")
{
realValue = this.prefBranch.getIntPref(prefName);
}
else if (defaultValue instanceof Array)
{
realValue = this.prefBranch.getCharPref(prefName);
realValue = this.stringToArray(realValue);
realValue.update = updateArrayPref;
}
else if (typeof defaultValue == "string" ||
defaultValue == null)
{
realValue = this.prefBranch.getCharPref(prefName);
}
}
catch (ex)
{
// if the pref doesn't exist, ignore the exception.
}
if (realValue == null)
return defaultValue;
record.realValue = realValue;
return realValue;
}
PrefManager.prototype.setPref =
function pm_setpref(prefName, value)
{
var prefManager = this;
function updateArrayPref() { prefManager.updateArrayPref(prefName); };
var record = this.prefRecords[prefName];
if (!ASSERT(record, "Unknown pref: " + prefName))
return null;
if ((record.realValue == null && value == record.defaultValue) ||
record.realValue == value)
{
// no realvalue, and value is the same as default value ... OR ...
// no change at all. just bail.
return record.realValue;
}
if (value == record.defaultValue)
{
this.clearPref(prefName);
return value;
}
var defaultValue = record.defaultValue;
if (typeof defaultValue == "function")
defaultValue = defaultValue(prefName);
if (typeof defaultValue == "boolean")
{
this.prefBranch.setBoolPref(prefName, value);
}
else if (typeof defaultValue == "number")
{
this.prefBranch.setIntPref(prefName, value);
}
else if (defaultValue instanceof Array)
{
var str = this.arrayToString(value);
this.prefBranch.setCharPref(prefName, str);
value.update = updateArrayPref;
}
else
{
this.prefBranch.setCharPref(prefName, value);
}
this.prefService.savePrefFile(null);
record.realValue = value;
return value;
}
PrefManager.prototype.clearPref =
function pm_reset(prefName)
{
this.prefRecords[prefName].realValue = null;
this.prefBranch.clearUserPref(prefName);
this.prefService.savePrefFile(null);
}
PrefManager.prototype.addPref =
function pm_addpref(prefName, defaultValue, setter)
{
var prefManager = this;
function updateArrayPref() { prefManager.updateArrayPref(prefName); };
function prefGetter() { return prefManager.getPref(prefName); };
function prefSetter(value) { return prefManager.setPref(prefName, value); };
if (!ASSERT(!(prefName in this.defaultValues),
"Preference already exists: " + prefName))
{
return;
}
if (!setter)
setter = prefSetter;
if (defaultValue instanceof Array)
defaultValue.update = updateArrayPref;
this.prefRecords[prefName] = {defaultValue: defaultValue, realValue: null};
this.prefNames.push(prefName);
this.prefNames.sort();
this.prefs.__defineGetter__(prefName, prefGetter);
this.prefs.__defineSetter__(prefName, setter);
}

Просмотреть файл

@ -29,25 +29,58 @@
var utils = new Object();
var DEBUG = true;
var dumpln;
var dd;
if (typeof document == "undefined") /* in xpcshell */
dumpln = print;
else
if (typeof dump == "function")
dumpln = function (str) {dump (str + "\n"); }
else if (jsenv.HAS_RHINO)
dumpln = function (str) {var out = java.lang.System.out;
out.println(str); out.flush(); }
else
dumpln = function () {} /* no suitable function */
if (DEBUG)
dd = dumpln;
else
if (DEBUG) {
var _dd_pfx = "";
var _dd_singleIndent = " ";
var _dd_indentLength = _dd_singleIndent.length;
var _dd_currentIndent = "";
var _dd_lastDumpWasOpen = false;
var _dd_timeStack = new Array();
var _dd_disableDepth = Number.MAX_VALUE;
var _dd_currentDepth = 0;
dd = function _dd(str) {
if (typeof str != "string") {
dump (str + "\n");
} else if (str[str.length - 1] == "{") {
++_dd_currentDepth;
if (_dd_currentDepth >= _dd_disableDepth)
return;
if (str.indexOf("OFF") == 0)
_dd_disableDepth = _dd_currentDepth;
_dd_timeStack.push (new Date());
if (_dd_lastDumpWasOpen)
dump("\n");
dump (_dd_pfx + _dd_currentIndent + str);
_dd_currentIndent += _dd_singleIndent;
_dd_lastDumpWasOpen = true;
} else if (str[0] == "}") {
if (--_dd_currentDepth >= _dd_disableDepth)
return;
_dd_disableDepth = Number.MAX_VALUE;
var sufx = (new Date() - _dd_timeStack.pop()) / 1000 + " sec";
_dd_currentIndent =
_dd_currentIndent.substr(0, _dd_currentIndent.length -
_dd_indentLength);
if (_dd_lastDumpWasOpen)
dump(str + " " + sufx + "\n");
else
dump(_dd_pfx + _dd_currentIndent + str + " " +
sufx + "\n");
_dd_lastDumpWasOpen = false;
} else {
if (_dd_currentDepth >= _dd_disableDepth)
return;
if (_dd_lastDumpWasOpen)
dump("\n");
dump(_dd_pfx + _dd_currentIndent + str + "\n");
_dd_lastDumpWasOpen = false;
}
}
} else {
dd = function (){};
}
var jsenv = new Object();
jsenv.HAS_SECURITYMANAGER = ((typeof netscape == "object") &&
@ -178,6 +211,32 @@ function dumpObjectTree (o, recurse, compress, level)
}
function replaceVars(str, vars)
{
// replace "string $with a $variable", with
// "string " + vars["with"] + " with a " + vars["variable"]
function doReplace(symbol)
{
var name = symbol.substr(1);
if (name in vars)
return vars[name];
return "$" + name;
};
return str.replace(/(\$\w[\w\d\-]+)/g, doReplace);
}
function formatException (ex)
{
if (ex instanceof Error)
return getMsg (MSG_FMT_JSEXCEPTION, [ex.name, ex.message, ex.fileName,
ex.lineNumber]);
return String(ex);
}
/*
* Clones an existing object (Only the enumerable properties
* of course.) use as a function..
@ -187,7 +246,7 @@ function dumpObjectTree (o, recurse, compress, level)
*/
function Clone (obj)
{
robj = new Object();
var robj = new Object();
for (var p in obj)
robj[p] = obj[p];
@ -196,6 +255,20 @@ function Clone (obj)
}
function Copy(source, dest, overwrite)
{
if (!dest)
dest = new Object();
for (var p in source)
{
if (overwrite || !(p in dest))
dest[p] = source[p];
}
return dest;
}
/*
* matches a real object against one or more pattern objects.
* if you pass an array of pattern objects, |negate| controls wether to check
@ -272,6 +345,16 @@ function matchEntry (partialName, list)
}
function encodeChar(ch)
{
return "%" + ch.charCodeAt(0).toString(16);
}
function escapeFileName(fileName)
{
return fileName.replace(/[^\w\d.,#-_]/g, encodeChar);
}
function getCommonPfx (list)
{
var pfx = list[0];
@ -298,6 +381,23 @@ function getCommonPfx (list)
}
function openTopWin (url)
{
return openDialog (getBrowserURL(), "_blank", "chrome,all,dialog=no", url);
}
function getWindowByType (windowType)
{
const MEDIATOR_CONTRACTID =
"@mozilla.org/appshell/window-mediator;1";
const nsIWindowMediator = Components.interfaces.nsIWindowMediator;
var windowManager =
Components.classes[MEDIATOR_CONTRACTID].getService(nsIWindowMediator);
return windowManager.getMostRecentWindow(windowType);
}
function renameProperty (obj, oldname, newname)
{
@ -336,6 +436,22 @@ function newObject(contractID, iface)
}
function getContentWindow(frame)
{
try
{
if (!frame || !("contentWindow" in frame))
return false;
return frame.contentWindow;
}
catch (ex)
{
// throws exception is contentWindow is gone
return null;
}
}
function getPriv (priv)
{
if (!jsenv.HAS_SECURITYMANAGER)
@ -357,6 +473,16 @@ function getPriv (priv)
}
function len(o)
{
var l = 0;
for (var p in o)
++l;
return l;
}
function keys (o)
{
var rv = new Array();
@ -391,13 +517,13 @@ function formatDateOffset (offset, format)
{
var ary = new Array();
if (days > 0)
ary.push (getMsg("days", days));
ary.push (getMsg(MSG_DAYS, days));
if (hours > 0)
ary.push (getMsg("hours", hours));
ary.push (getMsg(MSG_HOURS, hours));
if (minutes > 0)
ary.push (getMsg("minutes", minutes));
ary.push (getMsg(MSG_MINUTES, minutes));
if (seconds > 0 || offset == 0)
ary.push (getMsg("seconds", seconds));
ary.push (getMsg(MSG_SECONDS, seconds));
format = ary.join(", ");
}
@ -652,7 +778,43 @@ function getSpecialDirectory(name)
return utils.directoryService.get(name, Components.interfaces.nsIFile);
}
function encodeChar(ch)
function getFileFromURLSpec(url)
{
return "%" + ch.charCodeAt(0).toString(16);
const FILE_CTRID = "@mozilla.org/network/protocol;1?name=file";
const nsIFileProtocolHandler = Components.interfaces.nsIFileProtocolHandler;
var handler = Components.classes[FILE_CTRID].createInstance();
handler = handler.QueryInterface(nsIFileProtocolHandler);
return handler.getFileFromURLSpec(url);
}
function getURLSpecFromFile (file)
{
if (!file)
return null;
const IOS_CTRID = "@mozilla.org/network/io-service;1";
const LOCALFILE_CTRID = "@mozilla.org/file/local;1";
const nsIIOService = Components.interfaces.nsIIOService;
const nsILocalFile = Components.interfaces.nsILocalFile;
if (typeof file == "string")
{
var fileObj =
Components.classes[LOCALFILE_CTRID].createInstance(nsILocalFile);
fileObj.initWithPath(file);
file = fileObj;
}
var service = Components.classes[IOS_CTRID].getService(nsIIOService);
/* In sept 2002, bug 166792 moved this method to the nsIFileProtocolHandler
* interface, but we need to support older versions too. */
if ("getURLSpecFromFile" in service)
return service.getURLSpecFromFile(file);
var nsIFileProtocolHandler = Components.interfaces.nsIFileProtocolHandler;
var fileHandler = service.getProtocolHandler("file");
fileHandler = fileHandler.QueryInterface(nsIFileProtocolHandler);
return fileHandler.getURLSpecFromFile(file);
}

Просмотреть файл

@ -32,7 +32,6 @@
<?xul-overlay href="chrome://communicator/content/utilityOverlay.xul"?>
<?xul-overlay href="chrome://chatzilla/content/scripts.xul"?>
<?xul-overlay href="chrome://chatzilla/content/menus.xul"?>
<?xul-overlay href="chrome://chatzilla/content/popups.xul"?>
<window id="chatzilla-window"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
@ -43,7 +42,6 @@
<overlaytarget id="scripts-overlay-target"/>
<overlaytarget id="menu-overlay-target"/>
<overlaytarget id="popup-overlay-target"/>
<vbox id="outer-box" flex="1">
<vbox id="upper-box" flex="1">
@ -52,7 +50,8 @@
<tree id="user-list" container="true" datasources="rdf:null" flex="1"
containment="http://home.netscape.com/NC-irc#chanuser"
context="userlistPopup">
hidecolumnpicker="true"
context="context:userlist">
<template>
<rule>
@ -62,6 +61,7 @@
</conditions>
<bindings>
<binding subject="?member" predicate="http://home.netscape.com/NC-irc#sortname" object="?sortname"/>
<binding subject="?member" predicate="http://home.netscape.com/NC-irc#op" object="?op"/>
<binding subject="?member" predicate="http://home.netscape.com/NC-irc#voice" object="?voice"/>
<binding subject="?member" predicate="http://home.netscape.com/NC-irc#nick" object="?nick"/>
@ -69,11 +69,11 @@
<action>
<treechildren>
<treeitem uri="?member" flex="1" properties="op-?op voice-?voice">
<treeitem uri="?member" flex="1"
properties="op-?op voice-?voice">
<treerow>
<treecell properties="state-?op"/>
<treecell properties="state-?voice"/>
<treecell label="?nick"/>
<treecell properties="op-?op voice-?voice"
label="?nick"/>
</treerow>
</treeitem>
</treechildren>
@ -82,20 +82,7 @@
</template>
<treecols>
<treecol id="usercol-op" label="O"
persist="hidden sortDirection"
onclick="return onSortCol('usercol-op')"
resource="http://home.netscape.com/NC-irc#op" width="25"/>
<splitter class="tree-splitter"/>
<treecol id="usercol-voice" label="V"
persist="hidden sortDirection"
onclick="return onSortCol('usercol-voice')"
resource="http://home.netscape.com/NC-irc#voice" width="25"/>
<splitter class="tree-splitter"/>
<treecol id="usercol-nick" label="Nick" flex="1"
persist="sortDirection" ignoreincolumnpicker="true"
onclick="return onSortCol('usercol-nick')"
resource="http://home.netscape.com/NC-irc#nick"/>
<treecol id="usercol" flex="1" properties="op-?op voice-?voice"/>
</treecols>
</tree>
@ -106,44 +93,6 @@
</splitter>
<vbox flex="1">
<toolbox id="header-bar-tbox" crop="right" persist="collapsed">
<toolbar class="chromeclass-toolbar" id="header-bar-tbar"
grippytooltiptext="&header.tooltip;" crop="right">
<hbox flex="1" class="header-box">
<vbox flex="1%">
<label class="header-label" value="&url.label;"/>
<label class="header-label" value="&topic.label;"/>
</vbox>
<vbox flex="99%">
<hbox flex="1">
<hbox flex="1">
<label class="header-data" id="header-url"
ondraggesture="nsDragAndDrop.startDrag(event, tabDNDObserver);"
crop="right"/>
</hbox>
<hbox flex="1">
<label class="header-label" value="&mode.label;"/>
<label class="header-data" id="channel-mode"
crop="right"/>
</hbox>
<hbox flex="1">
<label class="header-label" value="&users.label;"/>
<label class="header-data" id="channel-users"/>
</hbox>
</hbox>
<hbox flex="1">
<hbox flex="1">
<label class="header-data" id="channel-topic" flex="1"
crop="right" onclick="onTopicEditStart()">text</label>
<textbox flex="1" id="channel-topicedit" collapsed="true"/>
</hbox>
</hbox>
</vbox>
</hbox>
</toolbar>
</toolbox>
<deck id="output-deck" flex="1"/>
</vbox>
@ -177,7 +126,7 @@
oncommand="onMultilineSend(event);"
tooltiptext="&multiline-send.tooltip;" />
<toolbarbutton id="button-multiline-contract"
oncommand="multilineInputMode(false);"
oncommand="dispatch('pref multiline false');"
tooltiptext="&multiline-contract.tooltip;" />
</vbox>
</hbox>
@ -185,18 +134,12 @@
<textbox id="input" class="input-widget" flex="1" autostretch="true"
onfocus="onInputFocus();"/>
<toolbarbutton id="button-multiline-expand"
oncommand="multilineInputMode(true);"
oncommand="dispatch('pref multiline true');"
tooltiptext="&multiline-expand.tooltip;"/>
</hbox>
</hbox>
</vbox> <!-- outer-box -->
<statusbar id="status-bar" persist="collapsed">
<statusbarpanel id="component-bar"/>
<statusbarpanel id="status-text" label="&StatusText.label;" flex="1"
crop="right"/>
<statusbarpanel class="statusbarpanel-icononly" id="offline-status"
hidden="true" offline="true"/>
</statusbar>
<overlaytarget id="statusbar-overlay-target"/>
</window>

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -0,0 +1,280 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* 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
* Netscape Communications Corporation
* Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation.
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the MPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the MPL or the GPL.
*
* Contributor(s):
* Robert Ginda, <rginda@netscape.com>, original author
*
*/
function initMenus()
{
function isMotif(name)
{
return "client.prefs['motif.current'] == " +
"client.prefs['motif." + name + "']";
};
function onMenuCommand (event, window)
{
var params;
var commandName = event.originalTarget.getAttribute("commandname");
if ("cx" in client.menuManager && client.menuManager.cx)
{
client.menuManager.cx.sourceWindow = window;
params = client.menuManager.cx;
}
else
{
params = { sourceWindow: window };
}
dispatch (commandName, params);
delete client.menuManager.cx;
};
client.onMenuCommand = onMenuCommand;
client.menuSpecs = new Object();
var menuManager = new MenuManager(client.commandManager,
client.menuSpecs,
getCommandContext,
"client.onMenuCommand(event, window);");
client.menuManager = menuManager;
client.menuSpecs["maintoolbar"] = {
items:
[
["disconnect"],
["quit"],
["part"]
]
};
client.menuSpecs["mainmenu:file"] = {
label: MSG_MNU_FILE,
getContext: getDefaultContext,
items:
[
["delete-view", {enabledif: "client.viewsArray.length > 1"}],
["quit"],
["disconnect"],
["-"],
[navigator.platform.search(/win/i) == -1 ?
"quit-mozilla" : "exit-mozilla"]
]
};
client.menuSpecs["popup:motifs"] = {
label: MSG_MNU_MOTIFS,
items:
[
["motif-default",
{type: "checkbox",
checkedif: isMotif("default")}],
["motif-dark",
{type: "checkbox",
checkedif: isMotif("dark")}],
["motif-light",
{type: "checkbox",
checkedif: isMotif("light")}],
]
};
client.menuSpecs["mainmenu:view"] = {
label: MSG_MNU_VIEW,
getContext: getDefaultContext,
items:
[
[">popup:showhide"],
["-"],
["toggle-oas",
{type: "checkbox",
checkedif: "isStartupURL(cx.sourceObject.getURL())"}],
["clear-view"],
["delete-view",
{visibleif: "!cx.channel || !cx.channel.active",
enabledif: "client.viewsArray.length > 1"}],
["leave", {visibleif: "cx.channel && cx.channel.active"}],
["-"],
[">popup:motifs"],
["toggle-ccm",
{type: "checkbox",
checkedif: "client.prefs['collapseMsgs']"}],
["toggle-copy",
{type: "checkbox",
checkedif: "client.prefs['copyMessages']"}]
]
};
/* Mac expects a help menu with this ID, and there is nothing we can do
* about it. */
client.menuSpecs["mainmenu:help"] = {
label: MSG_MNU_HELP,
domID: "menu_Help",
items:
[
["about"],
]
};
client.menuSpecs["popup:showhide"] = {
label: MSG_MNU_SHOWHIDE,
items:
[
["tabstrip",
{type: "checkbox",
checkedif: "isVisible('view-tabs')"}],
["header",
{type: "checkbox",
checkedif: "cx.sourceObject.prefs['displayHeader']"}],
["userlist",
{type: "checkbox",
checkedif: "isVisible('user-list-box')"}],
["statusbar",
{type: "checkbox",
checkedif: "isVisible('status-bar')"}],
]
};
client.menuSpecs["popup:opcommands"] = {
label: MSG_MNU_OPCOMMANDS,
items:
[
["op", {enabledif: "cx.channel.iAmOp() && !cx.user.isOp"}],
["deop", {enabledif: "cx.channel.iAmOp() && cx.user.isOp"}],
["voice", {enabledif: "cx.channel.iAmOp() && !cx.user.isVoice"}],
["devoice", {enabledif: "cx.channel.iAmOp() && cx.user.isVoice"}],
["-"],
["kick", {enabledif: "cx.channel.iAmOp()"}],
["kick-ban", {enabledif: "cx.channel.iAmOp()"}]
]
};
client.menuSpecs["context:userlist"] = {
getContext: getUserlistContext,
items:
[
["toggle-usort", {type: "checkbox",
checkedif: "client.prefs['sortUsersByMode']"}],
["-"],
[">popup:opcommands", {enabledif: "cx.channel && cx.channel.iAmOp()"}],
["whois"],
["query"],
["version"],
]
};
var urlenabled = "has('url') && cx.url.search(/^irc:/i) == -1";
client.menuSpecs["context:messages"] = {
getContext: getMessagesContext,
items:
[
["goto-url", {enabledif: urlenabled}],
["goto-url-newwin", {enabledif: urlenabled}],
["goto-url-newtab", {enabledif: urlenabled}],
["-"],
["leave",
{enabledif: "cx.TYPE == 'IRCChannel'"}],
["delete-view", {enabledif: "client.viewsArray.length > 1"}],
["disconnect"],
["-"],
[">popup:opcommands", {enabledif: "cx.channel && cx.channel.iAmOp()"}],
["whois"],
["query"],
["version"],
["-"],
[">popup:motifs"],
["toggle-oas",
{type: "checkbox",
checkedif: "isStartupURL(cx.sourceObject.getURL())"}],
]
};
client.menuSpecs["context:tab"] = {
getContext: getTabContext,
items:
[
["leave",
{enabledif: "cx.TYPE == 'IRCChannel'"}],
["delete-view", {enabledif: "client.viewsArray.length > 1"}],
["disconnect"],
["-"],
["toggle-oas",
{type: "checkbox",
checkedif: "isStartupURL(cx.sourceObject.getURL())"}],
]
};
}
function createMenus()
{
client.menuManager.createMenus(document, "mainmenu");
client.menuManager.createContextMenus(document);
}
function getCommandContext (id, event)
{
var cx = { originalEvent: event };
if (id in client.menuSpecs)
{
if ("getContext" in client.menuSpecs[id])
cx = client.menuSpecs[id].getContext(cx);
else if ("cx" in client.menuManager)
{
//dd ("using existing context");
cx = client.menuManager.cx;
}
else
{
//no context.
}
}
else
{
dd ("getCommandContext: unknown menu id " + id);
}
if (typeof cx == "object")
{
if (!("menuManager" in cx))
cx.menuManager = client.menuManager;
if (!("contextSource" in cx))
cx.contextSource = id;
if ("dbgContexts" in client && client.dbgContexts)
dd ("context '" + id + "'\n" + dumpObjectTree(cx));
}
return cx;
}

Просмотреть файл

@ -12,7 +12,7 @@
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is Chatzilla
- The Original Code is The JavaScript Debugger
-
- The Initial Developer of the Original Code is
- Netscape Communications Corporation
@ -45,23 +45,18 @@
<overlaytarget id="menu-overlay-target">
<commandset id="chatzillaCommands">
<!-- parents for the command manager-managed objects -->
<keyset id="dynamic-keys"/>
<popupset id="dynamic-popups"/>
<!-- Hidden commands -->
<command id="cmd_reload_ui"
oncommand="if (!('client' in window) || client.getConnectionCount() == 0) window.location.href = window.location.href;"/>
<command id="cmd_focus_input" oncommand="focusInput();"/>
<command id="cmd_next_view" oncommand="cycleView(1);"/>
<command id="cmd_prev_view" oncommand="cycleView(-1);"/>
<!-- tooltip thingy -->
<tooltip id="html-tooltip-node" onpopupshowing="return onTooltip(event);"/>
<tooltip id="xul-tooltip-node" onpopupshowing="return onTooltip(event);"/>
<!-- File commands -->
<command id="cmd_closewin" oncommand="window.close();"/>
<command id="cmd_quit"/>
<!-- Commands -->
<commandset id="chatzilla-commands">
<!-- File:Options commands -->
<command id="cmd_debug" oncommand="onToggleTraceHook()"/>
<!-- Edit Menu -->
<!-- Edit commands -->
<commandset id="selectEditMenuItems"/>
<commandset id="globalEditMenuItems"/>
<commandset id="undoEditMenuItems"/>
@ -74,44 +69,17 @@
<command id="cmd_delete"/>
<command id="cmd_selectAll"/>
<!-- View commands -->
<command id="cmd_toggle_startup_visit"
oncommand="onToggleStartupURL();"/>
<!-- View:Show/Hide -->
<command id="cmd_toggletabstrip"
oncommand="onToggleVisibility('tabstrip');"/>
<command id="cmd_togglelist" oncommand="onToggleVisibility('info');"/>
<command id="cmd_toggleheader" oncommand="onToggleVisibility('header');"/>
<command id="cmd_togglestatus" oncommand="onToggleVisibility('status');"/>
<!-- Tasks commands, from overlay -->
<commandset id="tasksCommands"/>
</commandset>
<!-- Keys -->
<keyset id="chatzillaKeys">
<!-- Hidden keys -->
<key id="key_focus_input" observes="cmd_focus_input" keycode="VK_ESCAPE"/>
<key id="key_test" oncommand="onTest();"
modifiers="accel alt" key="T"/>
<key id="key_reload_ui" observes="cmd_reload_ui"
modifiers="accel alt" key="R"/>
<key id="key_next_view" observes="cmd_next_view"
modifiers="control" keycode="VK_TAB"/>
<key id="key_prev_view" observes="cmd_prev_view"
modifiers="control shift" keycode="VK_TAB"/>
<key id="key_next_view" observes="cmd_next_view"
modifiers="control" keycode="VK_PAGE_DOWN"/>
<key id="key_prev_view" observes="cmd_prev_view"
modifiers="control" keycode="VK_PAGE_UP"/>
<key id="key:reloadui" modifiers="accel alt" key="R"
oncommand="if (typeof cmdReloadUI =='function') cmdReloadUI(); else window.location.href = window.location.href;"/>
<!-- File keys -->
<key id="key_debug" observes="cmd_debug"
modifiers="accel shift" key="D"/>
<key id="key_closewin" observes="cmd_closewin"
modifiers="accel shift" key="W"/>
<!-- Edit Keys -->
<!-- Edit keys -->
<key id="key_undo"/>
<key id="key_redo"/>
<key id="key_cut"/>
@ -120,76 +88,18 @@
<key id="key_delete"/>
<key id="key_selectAll"/>
<!-- View keys -->
<key id="key_clearview" observes="cmd_clearview"
modifiers="accel" key="R"/>
<key id="key_deleteview" observes="cmd_deleteview"
modifiers="accel" key="W"/>
<key id="key_status" observes="cmd_status"
modifiers="accel shift" key="S"/>
<!-- View:Show/Hide keys -->
<key id="key_toggletabstrip"/>
<key id="key_togglelist" observes="cmd_togglelist"
modifiers="accel" key="L"/>
<key id="key_toggleheader" observes="cmd_toggleheader"
modifiers="accel" key="H"/>
<key id="key_togglestatus"/>
<!-- Tasks keys -->
<!-- Tasks keys, from overlay -->
<keyset id="tasksKeys"/>
</keyset>
<toolbox flex="1">
<menubar id="main-menubar" persist="collapsed"
grippytooltiptext="&menuBar.tooltip;">
<!-- Main menu bar -->
<toolbox flex="1" id="main-toolbox">
<menubar id="mainmenu" persist="collapsed"
grippytooltiptext="&Menubar.tooltip;">
<!-- File menu -->
<menu id="menu_File">
<menupopup id="menu_FilePopup">
<menu label="&OptionsCmd.label;" accesskey="&OptionsCmd.accesskey;">
<menupopup>
<!-- File menu placeholder, see menus.js -->
<menu id="mainmenu:file"/>
<menu label="&MungerCmd.label;" accesskey="&MungerCmd.accesskey;">
<menupopup id="menu-munger">
<menuitem id="menu-munger-global"
label="&DisableMunger.label;"
oncommand="onToggleMunger()" type="checkbox"/>
<menuitem id="menu-colors" label="&EnableColors.label;"
accesskey="&EnableColors.accesskey;"
oncommand="onToggleColors();" type="checkbox"/>
<menuseparator/>
</menupopup>
</menu>
<menuseparator/>
<menuitem id="menu-dmessages" label="&DebugMsgCmd.label;"
accesskey="&DebugMsgCmd.aKey;" type="checkbox"
observes="cmd_debug" key="key_debug"/>
<menuseparator/>
<menuitem id="menu-settings-save-now"
label="&SaveSetNowCmd.label;" accesskey="&SaveSetNowCmd.akey;"
oncommand="writePrefs()"/>
<menuitem id="menu-settings-autosave"
label="&SaveSetExitCmd.label;" accesskey="&SaveSetExitCmd.akey;"
oncommand="onToggleSaveOnExit()" type="checkbox"/>
</menupopup>
</menu>
<menuseparator/>
<menuitem label="&DeleteViewCmd.label;"
accesskey="&DeleteViewCmd.aKey;"
observes="cmd_deleteview" key="key_deleteview"/>
<menuitem label="&CloseCmd.label;"
accesskey="&CloseCmd.aKey;"
observes="cmd_closewin" key="key_closewin"/>
</menupopup>
</menu>
<!-- Edit menu -->
<menu id="menu_Edit">
<menupopup id="menu_Edit_Popup">
@ -204,90 +114,41 @@
<menuitem id="menu_selectAll"/>
<menuseparator/>
<menuitem id="menu_preferences"
oncommand="goPreferences('chatzillaItem', 'chrome://chatzilla/content/prefpanel/pref-irc.xul', 'chatzillaItem')"/>
oncommand="goPreferences('chatzillaItem', 'chrome://chatzilla/content/prefpanel/pref-irc.xul', 'chatzillaItem');"/>
</menupopup>
</menu>
<!-- View menu -->
<menu label="&ViewCmd.label;" accesskey="&ViewCmd.aKey;">
<menupopup onpopupshowing="return onViewMenuShowing();">
<menu label="&ShowCmd.label;" accesskey="&ShowCmd.akey;">
<menupopup>
<menuitem id="menu-view-tabstrip"
label="&ShowTabStripCmd.label;"
accesskey="&ShowTabStripCmd.aKey;" type="checkbox"
key="key_toggletabstrip" observes="cmd_toggletabstrip"/>
<menuitem id="menu-view-header" label="&ShowHeaderCmd.label;"
accesskey="&ShowHeaderCmd.aKey;" type="checkbox"
key="key_toggleheader" observes="cmd_toggleheader"/>
<menuitem id="menu-view-info" label="&ShowUserlistCmd.label;"
accesskey="&ShowUserlistCmd.aKey;" type="checkbox"
key="key_togglelist" observes="cmd_togglelist"/>
<menuitem id="menu-view-status" label="&ShowStatusbarCmd.label;"
accesskey="&ShowStatusbarCmd.aKey;" type="checkbox"
key="key_togglestatus" observes="cmd_togglestatus"/>
</menupopup>
</menu>
<menuseparator/>
<menuitem id="menu-view-default" label="&DefaultCmd.label;"
accesskey="&DefaultCmd.aKey;" type="checkbox"
oncommand="onSimulateCommand('/css default');"/>
<menuitem id="menu-view-dark" label="&DarkCmd.label;"
accesskey="&DarkCmd.aKey;" type="checkbox"
oncommand="onSimulateCommand('/css dark');"/>
<menuitem id="menu-view-light" label="&LightCmd.label;"
accesskey="&LightCmd.aKey;" type="checkbox"
oncommand="onSimulateCommand('/css light');"/>
<menuseparator/>
<!-- hide vs delete nuances are too vague
<menuitem label="&HideCmd.label;" oncommand="onHideCurrentView();"/>
-->
<menuitem id="menu-view-startup" label="&StartupVisitCmd.label;"
accesskey="&StartupVisitCmd.aKey;" type="checkbox"
observes="cmd_toggle_startup_visit"/>
<menuitem label="&ClearViewCmd.label;"
accesskey="&ClearViewCmd.aKey;"
observes="cmd_clearview" key="key_clearview"/>
<menuitem label="&DeleteViewCmd.label;"
accesskey="&DeleteViewCmd.aKey;"
observes="cmd_deleteview" key="key_deleteview"/>
<menuseparator/>
<menuitem label="&StatusCmd.label;" accesskey="&StatusCmd.aKey;"
observes="cmd_status" key="key_status"/>
<menuseparator/>
<menuitem id="menu-view-collapse" label="&CollapseCmd.label;"
accesskey="&CollapseCmd.aKey;" type="checkbox"
oncommand="onToggleMsgCollapse();"/>
<menuitem id="menu-view-copymsgs" label="&CopyMessagesCmd.label;"
accesskey="&CopyMessagesCmd.aKey;" type="checkbox"
oncommand="onToggleCopyMessages();"/>
</menupopup>
</menu>
<!-- View menu placeholder, see venkman-menus.js -->
<menu id="mainmenu:view"/>
<!-- Tasks menu -->
<menu id="tasksMenu"/>
<!-- Window menu -->
<!-- Tasks menu -->
<menu id="windowMenu"/>
<!-- Help menu -->
<!-- Mac expects a help menu with this ID, and there is nothing we can
do about it. -->
<menu id="menu_Help"/>
</menubar>
</menubar>
</toolbox>
</toolbox>
</overlaytarget>
<!-- Statusbar (hey, it's /almost/ a menu) -->
<overlaytarget id="statusbar-overlay-target">
<statusbar class="chromeclass-status" id="status-bar" flex="1">
<statusbarpanel id="component-bar"/>
<statusbarpanel id="status-text" label="" flex="1"
crop="right"/>
<!--
<statusbarpanel class="statusbarpanel-iconic" id="offline-status"
hidden="true" offline="true"/>
-->
</statusbar>
</overlaytarget>
</overlay>

Просмотреть файл

@ -0,0 +1,128 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* 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
* Netscape Communications Corporation
* Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation.
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the MPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the MPL or the GPL.
*
* Contributor(s):
* Robert Ginda, <rginda@netscape.com>, original author
*
*/
function initMessages()
{
var path = "chrome://chatzilla/locale/chatzilla.properties";
client.messageManager = new MessageManager();
client.defaultBundle = client.messageManager.addBundle(path);
client.name = MSG_CLIENT_NAME;
client.responseCodeMap =
{
"HELLO": MSG_RSP_HELLO,
"HELP" : MSG_RSP_HELP,
"USAGE": MSG_RSP_USAGE,
"ERROR": MSG_RSP_ERROR,
"WARNING": MSG_RSP_WARN,
"INFO": MSG_RSP_INFO,
"EVAL-IN": MSG_RSP_EVIN,
"EVAL_-OUT": MSG_RSP_EVOUT,
"JOIN": "-->|",
"PART": "<--|",
"QUIT": "|<--",
"NICK": "=-=",
"TOPIC": "=-=",
"KICK": "=-=",
"MODE": "=-=",
"END_STATUS": "---",
"315": "---", /* end of WHO */
"318": "---", /* end of WHOIS */
"366": "---", /* end of NAMES */
"376": "---" /* end of MOTD */
};
}
function checkCharset(charset)
{
return client.messageManager.checkCharset(charset);
}
function toUnicode (msg, charsetOrView)
{
if (!msg)
return msg;
var charset;
if (typeof charsetOrView == "object")
charset = charsetOrView.prefs["charset"];
else if (typeof charsetOrView == "string")
charset = charsetOrView;
else
charset = client.currentObject.prefs["charset"];
return client.messageManager.toUnicode(msg, charset);
}
function fromUnicode (msg, charsetOrView)
{
if (!msg)
return msg;
var charset;
if (typeof charsetOrView == "object")
charset = charsetOrView.prefs["charset"];
else if (typeof charsetOrView == "string")
charset = charsetOrView;
else
charset = client.currentObject.prefs["charset"];
return client.messageManager.fromUnicode(msg, charset);
}
function getMsg(msgName, params, deflt)
{
return client.messageManager.getMsg(msgName, params, deflt);
}
function getMsgFrom(bundle, msgName, params, deflt)
{
return client.messageManager.getMsgFrom(bundle, msgName, params, deflt);
}
/* message types, don't localize */
const MT_ATTENTION = "ATTENTION";
const MT_ERROR = "ERROR";
const MT_HELLO = "HELLO";
const MT_HELP = "HELP";
const MT_MODE = "MODE";
const MT_WARN = "WARN";
const MT_INFO = "INFO";
const MT_USAGE = "USAGE";
const MT_STATUS = "STATUS";
const MT_EVALIN = "EVAL-IN";
const MT_EVALOUT = "EVAL-OUT";

Просмотреть файл

@ -0,0 +1,170 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<style>
[hidden="true"] {
display: none;
}
.header-outer {
position: fixed;
}
.header {
background-color: white;
color: black;
margin: 2px;
border: 1px black solid;
}
#h-table,
#net-url,
#ch-url {
width: 100%;
}
#splash {
padding-top: 55%;
padding-bottom: 20%;
font-size: 24pt;
font-weight: bold;
text-align: center;
}
#cli-version-container {
text-align: center;
width: 100%;
}
#usr-descnodes,
#ch-topicnodes {
line-height: 110%;
}
#ch-usercount,
#ch-modestr,
#net-lag {
white-space: nowrap;
}
.label {
font-weight: bold;
text-align: right;
vertical-align: top;
white-space: nowrap;
padding-right: 0.5em;
}
.value {
vertical-align: top;
padding-right: 1em;
}
#usr-title,
#usr-descnodes {
text-align: center;
}
</style>
<link id="pre-effect-css" rel="stylesheet" type="text/css"
href="about-blank">
<link id="main-css" rel="stylesheet" type="text/css"
href="about:blank">
<link id="post-effect-css" rel="stylesheet" type="text/css"
href="about:blank">
<head>
<script src="chrome://chatzilla/content/output-window.js"></script>
<!-- <script src="file:///home/rginda/.chatzilla/scripts/goodies/output-window.js"></script> -->
</head>
<body class="chatzilla-body">
<div class="header-outer">
<div class="header" id="cli-container" hidden="true">
<table id="h-table">
<tbody>
<tr>
<td class="label">Known Networks</td>
<td class="value" id="cli-netcount">&lt;none&gt;</td>
<td class="label" id="cli-version-container"
condition="yellow">ChatZilla <span id="cli-version">0.9.8</span></td>
<td class="label">Connected Networks</td>
<td class="value" id="cli-connectcount">&lt;none&gt;</td>
</tr>
</tbody>
</table>
</div>
<div class="header" id="net-container" hidden="true">
<table id="h-table">
<tbody>
<tr>
<td class="label" id="net-url-l">URL</td>
<td class="value" id="net-url">
<a id="net-url-anchor" class="chatzilla-link"
href="irc://foo/bar">irc://foo/bar</a>
</td>
<td class="value" id="net-status"
condition="red">Not Connected</td>
<td class="label" id="net-lag-l">Lag</td>
<td class="value" id="net-lag">&lt;unknown&gt;</td>
</td>
</tr>
</tbody>
</table>
</div>
<div class="header" id="ch-container" hidden="true">
<table id="h-table">
<tbody>
<tr>
<td class="label" id="ch-url-l">URL</td>
<td class="value" id="ch-url">
<a id="ch-url-anchor" class="chatzilla-link"
href="irc://foo/bar">irc://foo/bar</a>
</td>
<td class="label" id="ch-modestr-l">Mode</td>
<td class="value" id="ch-modestr">&lt;none&gt;</td>
<td class="label" id="ch-usercount-l">Users</td>
<td class="value" id="ch-usercount">&lt;none&gt;</td>
</tr>
<tr>
<td class="label" id="ch-topicnodes-l">Topic</td>
<td class="value" id="ch-topicnodes"
colspan="6">&lt;none&gt;</td>
</tr>
</tbody>
</table>
</div>
<div class="header" id="usr-container" hidden="true">
<table id="h-table">
<tbody>
<tr>
<td class="label">URL</td>
<td class="value" width="100%">
<a id="usr-url-anchor" class="chatzilla-link"
href="irc://foo/bar">irc://foo/bar</a>
</td>
<td class="label" id="usr-serverstr-l">Connected via</td>
<td class="value" id="usr-serverstr">&lt;none&gt;</td>
</tr>
<tr>
<td id="usr-title" colspan="4">&lt;none&gt;</td>
</tr>
<tr>
<td id="usr-descnodes" colspan="4">&lt;none&gt;</td>
</tr>
</tbody>
</table>
</div>
</div>
<div id="messages-outer" hidden="true">
<div id="splash"></div>
<div id="output"></div>
</div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,355 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* 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
* Netscape Communications Corporation
* Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation.
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the MPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the MPL or the GPL.
*
* Contributor(s):
* Robert Ginda, <rginda@netscape.com>, original author
*
*/
var initialized = false;
var view;
var client;
var mainWindow;
var dd;
var getMsg;
var getObjectDetails;
var header = null;
var headers = {
IRCClient: {
prefix: "cli-",
fields: ["container", "netcount", "version-container", "version",
"connectcount"],
update: updateClient
},
IRCNetwork: {
prefix: "net-",
fields: ["container", "url-anchor", "status", "lag"],
update: updateNetwork
},
IRCChannel: {
prefix: "ch-",
fields: ["container", "url-anchor", "modestr", "usercount",
"topicnodes"],
update: updateChannel
},
IRCUser: {
prefix: "usr-",
fields: ["container", "url-anchor", "serverstr", "title",
"descnodes"],
update: updateUser
}
};
var initOutputWindow = stock_initOutputWindow;
function stock_initOutputWindow(newClient, newView)
{
function initHeader()
{
/* it's better if we wait a half a second before poking at these
* dom nodes. */
setHeaderState(view.prefs["displayHeader"]);
updateHeader();
var div = document.getElementById("messages-outer");
div.removeAttribute("hidden");
window.scrollTo(0, window.document.height);
};
client = newClient;
view = newView;
mainWindow = client.mainWindow;
client.messageManager.importBundle(client.defaultBundle, window);
getMsg = mainWindow.getMsg;
getObjectDetails = mainWindow.getObjectDetails;
dd = mainWindow.dd;
changeCSS(view.prefs["motif.current"]);
var output = document.getElementById("output");
output.appendChild(view.messages);
if (view.TYPE in headers)
{
header = cacheNodes(headers[view.TYPE].prefix,
headers[view.TYPE].fields);
header.update = headers[view.TYPE].update;
}
var splash = document.getElementById("splash");
var name;
if ("unicodeName" in view)
name = view.unicodeName;
else if ("properNick" in view)
name = view.properNick;
else
name = view.name;
splash.appendChild(document.createTextNode(name));
setTimeout(initHeader, 500);
initialized = true;
}
function cacheNodes(pfx, ary, nodes)
{
if (!nodes)
nodes = new Object();
for (var i = 0; i < ary.length; ++i)
nodes[ary[i]] = document.getElementById(pfx + ary[i]);
return nodes;
}
function changeCSS(url, id)
{
if (!id)
id = "main-css";
node = document.getElementById(id);
if (!node)
{
node = document.createElement("link");
node.setAttribute("id", "main-css");
node.setAttribute("rel", "stylesheet");
node.setAttribute("type", "text/css");
var head = document.getElementsByTagName("head")[0];
head.appendChild(node);
}
else
{
if (node.getAttribute("href") == url)
return;
}
node.setAttribute("href", url);
window.scrollTo(0, window.document.height);
}
function setText(field, text, checkCondition)
{
if (!header[field].firstChild)
header[field].appendChild(document.createTextNode(""));
if (typeof text != "string")
{
text = MSG_UNKNOWN;
if (checkCondition)
setAttribute(field, "condition", "red");
}
else if (checkCondition)
{
setAttribute(field, "condition", "green");
}
header[field].firstChild.data = text;
}
function setAttribute(field, name, value)
{
if (!value)
value = "true";
header[field].setAttribute(name, value);
}
function removeAttribute(field, name)
{
header[field].removeAttribute(name);
}
function hasAttribute(field, name)
{
header[field].hasAttribute(name);
}
function setHeaderState(state)
{
if (header)
{
if (state)
{
updateHeader();
removeAttribute("container", "hidden");
}
else
{
setAttribute("container", "hidden");
}
}
}
function updateHeader()
{
if (!header || hasAttribute("container", "hidden"))
return;
for (var id in header)
{
var value;
if (id == "url-anchor")
{
value = view.getURL();
setAttribute("url-anchor", "href", value);
setText("url-anchor", value);
}
else if (id in view)
{
setText(id, view[id]);
}
}
if (header.update)
header.update();
}
function updateClient()
{
var n = 0, c = 0;
for (name in client.networks)
{
++n;
if (client.networks[name].isConnected())
++c;
}
setAttribute("version-container", "title", client.userAgent);
setAttribute("version-container", "condition", mainWindow.__cz_condition);
setText("version", mainWindow.__cz_version);
setText("netcount", String(n));
setText("connectcount", String(c));
}
function updateNetwork()
{
if (view.connecting)
{
setText("status", MSG_CONNECTING);
setAttribute("status","condition", "yellow");
removeAttribute("status", "title");
setText("lag", MSG_UNKNOWN);
}
else if (view.isConnected())
{
setText("status", MSG_CONNECTED);
setAttribute("status","condition", "green");
setAttribute("status", "title",
getMsg(MSG_CONNECT_VIA, view.primServ.name));
if (view.primServ.lag != -1)
setText("lag", getMsg(MSG_FMT_SECONDS, view.primServ.lag));
else
setText("lag", MSG_UNKNOWN);
}
else
{
setText("status", MSG_DISCONNECTED);
setAttribute("status","condition", "red");
removeAttribute("status", "title");
setText("lag", MSG_UNKNOWN);
}
}
function updateChannel()
{
header["topicnodes"].removeChild(header["topicnodes"].firstChild);
if (view.active)
{
var str = view.mode.getModeStr();
if (!str)
str = MSG_NO_MODE;
setText("modestr", str);
setAttribute("modestr", "condition", "green");
setText("usercount", getMsg(MSG_FMT_USERCOUNT,
[view.getUsersLength(), view.opCount,
view.voiceCount]));
setAttribute("usercount", "condition", "green");
if (view.topic)
{
var nodes = client.munger.munge(view.topic, null,
getObjectDetails(view));
header["topicnodes"].appendChild(nodes);
}
else
{
setText("topicnodes", MSG_NONE);
}
}
else
{
setText("modestr", MSG_UNKNOWN);
setAttribute("modestr", "condition", "red");
setText("usercount", MSG_UNKNOWN);
setAttribute("usercount", "condition", "red");
setText("topicnodes", MSG_UNKNOWN);
}
}
function updateUser()
{
var source;
if (view.name)
source = "<" + view.name + "@" + view.host + ">";
else
source = MSG_UNKNOWN;
if (view.parent.isConnected)
setText("serverstr", view.connectionHost, true);
else
setText("serverstr", null, true);
setText("title", getMsg(MSG_TITLE_USER, [view.properNick, source]));
header["descnodes"].removeChild(header["descnodes"].firstChild);
if (typeof view.desc != "undefined")
{
var nodes = client.munger.munge(view.desc, null,
getObjectDetails(view));
header["descnodes"].appendChild(nodes);
}
else
{
setText("descnodes", "");
}
}

Просмотреть файл

Просмотреть файл

@ -45,10 +45,10 @@
<commandset id="chatzillaPopupCommands">
<!-- Context menu commands -->
<command id="cmd_leaveview" oncommand="onPopupSimulateCommand('/part');"/>
<command id="cmd_clearview" oncommand="onClearCurrentView();"/>
<command id="cmd_deleteview" oncommand="onDeleteView(client.currentObject);"/>
<command id="cmd_status" oncommand="client.onInputStatus();"/>
<command id="cmd_leaveview" oncommand="dispatch('part');"/>
<command id="cmd_clearview" oncommand="dispatch('clear-view');"/>
<command id="cmd_deleteview" oncommand="dispatch('delete-view');"/>
<command id="cmd_status" oncommand="dispatch('status')"/>
<command id="cmd_popup_query"
oncommand="onPopupSimulateCommand('/query $nick');"/>
<command id="cmd_popup_whois"

Просмотреть файл

@ -137,7 +137,7 @@
<menulist flex="1" id="czStyleCSS" crop="center"
prefvalue="" prefattribute="prefvalue" wsm_attributes="prefvalue"
prefdefval="chrome://chatzilla/skin/output-default.css"
preftype="string" prefstring="extensions.irc.style.default">
preftype="string" prefstring="extensions.irc.motif.current">
<menupopup>
<menuitem label="&style.default.label;"
oncommand="selectStyle(this.getAttribute('url'));"

Просмотреть файл

@ -45,9 +45,9 @@
"czReconnect", "czColorCodes", "czNickCompleteStr", "czCharset"];
const OSBS_CTRID = "@mozilla.org/observer-service;1";
const Components.interfaces.nsIObserverService = nsIObserverService;
const nsIObserverService = Components.interfaces.nsIObserverService;
var observerService =
Components.classes[OBS_CTRID].getService(nsIObserverService);
Components.classes[OSBS_CTRID].getService(nsIObserverService);
observerService.notifyObservers(null, "charsetmenu-selected", "other");
]]>
@ -79,6 +79,7 @@
</row>
</rows>
</grid>
<!--
<hbox id="czUserHelpButton">
<button label="&userDetails.help.label;"
accesskey="&userDetails.help.accesskey;"
@ -88,6 +89,7 @@
"/>
<spacer flex="1"/>
</hbox>
-->
<label id="czUserHelpBox" hidden="true">&userDetails.help.desc;</label>
</groupbox>
@ -99,16 +101,16 @@
prefstring="extensions.irc.notify.aggressive"/>
<checkbox id="czDisplayCollapse" label="&global.collapse.label;"
accesskey="&global.collapse.accesskey;" prefdefval="false"
prefstring="extensions.irc.views.collapseMsgs"/>
prefstring="extensions.irc.collapseMsgs"/>
<checkbox id="czDisplayCopyMsgs" label="&global.copyMsgs.label;"
accesskey="&global.copyMsgs.accesskey;" prefdefval="true"
prefstring="extensions.irc.views.copyMessages"/>
prefstring="extensions.irc.copyMessages"/>
<checkbox id="czReconnect" label="&global.reconnect.label;"
accesskey="&global.reconnect.accesskey;" prefdefval="true"
prefstring="extensions.irc.reconnect"/>
<checkbox id="czColorCodes" label="&global.colorcodes.label;"
accesskey="&global.colorcodes.accesskey;" prefdefval="false"
prefstring="extensions.irc.colorCodes"/>
prefstring="extensions.irc.outgoing.colorCodes"/>
<separator/>
<hbox align="center">
<label value="&global.nickCompleteStr.label;" control="czNickCompleteStr"

Просмотреть файл

@ -50,10 +50,10 @@ function loadList(list)
var prefList = gList.getAttribute("prefvalue");
if (prefList)
if (prefList.search(/\S/) != -1)
{
var items = prefList.split(/\s*;\s*/);
for (i in items)
for (var i = 0; i < items.length; i++)
listAddItem(list, items[i]);
}
@ -195,7 +195,7 @@ function listUpdate(list)
for (var item = gList.firstChild; item; item = item.nextSibling)
{
var url = item.getAttribute("url");
var url = escape(item.getAttribute("url"));
if (prefList)
prefList = prefList + "; " + url;
else
@ -237,6 +237,7 @@ function listAddItem(list, url)
var gList = document.getElementById("czInitial" + list);
var newItem = document.createElement("listitem");
url = unescape(url);
var label = url;
if (list == "URLs")
label = getIRCDisplayText(url);

Просмотреть файл

@ -0,0 +1,519 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* 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
* Netscape Communications Corporation
* Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation.
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the MPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the MPL or the GPL.
*
* Contributor(s):
* Robert Ginda, <rginda@netscape.com>, original author
*
*/
const DEFAULT_NICK = "IRCMonkey"
function initPrefs()
{
client.prefManager = new PrefManager("extensions.irc.");
client.prefManagers = [client.prefManager];
client.prefs = client.prefManager.prefs;
var profilePath = getSpecialDirectory("ProfD");
profilePath.append("chatzilla");
client.prefManager.addPref("profilePath", profilePath.path);
profilePath = new nsLocalFile(client.prefs["profilePath"]);
if (!profilePath.exists())
mkdir(profilePath);
client.prefManager.profilePath = profilePath;
var scriptPath = profilePath.clone();
scriptPath.append("scripts");
if (!scriptPath.exists())
mkdir(scriptPath);
client.prefManager.scriptPath = scriptPath;
var logPath = profilePath.clone();
logPath.append("logs");
if (!logPath.exists())
mkdir(logPath);
client.prefManager.logPath = logPath;
var logDefault = client.prefManager.logPath.clone();
logDefault.append(escapeFileName("client.log"));
var prefs =
[
["aliases", []],
["bugURL", "http://bugzilla.mozilla.org/show_bug.cgi?id=%s"],
["channelHeader", true],
["channelLog", false],
["channelMaxLines", 500],
["charset", "utf-8"],
["clientMaxLines", 200],
["collapseMsgs", false],
["copyMessages", true],
["debugMode", ""],
["desc", "New Now Know How"],
["deleteOnPart", true],
["displayHeader", true],
["guessCommands", true],
["focusChannelOnJoin", true],
["initialURLs", []],
["initialScripts", [getURLSpecFromFile(scriptPath.path)]],
["log", false],
["logFileName", logDefault.path],
["messages.click", "goto-url"],
["messages.ctrlClick", "goto-url-newwin"],
["messages.metaClick", "goto-url-newtab"],
["motif.dark", "chrome://chatzilla/skin/output-dark.css"],
["motif.light", "chrome://chatzilla/skin/output-light.css"],
["motif.default", "chrome://chatzilla/skin/output-default.css"],
["motif.current", "chrome://chatzilla/skin/output-default.css"],
["msgBeep", "beep beep"],
["multiline", false],
["munger.colorCodes", true],
["networkHeader", true],
["networkLog", false],
["networkMaxLines", 200],
["newTabLimit", 15],
["notify.aggressive", true],
["nickCompleteStr", ":"],
["nickname", DEFAULT_NICK],
["outgoing.colorCodes", false],
["outputWindowURL", "chrome://chatzilla/content/output-window.html"],
["sortUsersByMode", true],
["queryBeep", "beep"],
["raiseNewTab", false],
["reconnect", true],
["stalkBeep", "beep"],
["stalkWholeWords", true],
["stalkWords", []],
["username", "chatzilla"],
["usermode", "+ix"],
["userHeader", true],
["userLog", false],
["userMaxLines", 200]
];
client.prefManager.addPrefs(prefs);
client.prefManager.onPrefChanged = onPrefChanged;
CIRCNetwork.prototype.stayingPower = client.prefs["reconnect"];
CIRCNetwork.prototype.INITIAL_NICK = client.prefs["nickname"];
CIRCNetwork.prototype.INITIAL_NAME = client.prefs["username"];
CIRCNetwork.prototype.INITIAL_DESC = client.prefs["desc"];
CIRCNetwork.prototype.INITIAL_UMODE = client.prefs["usermode"];
CIRCNetwork.prototype.MAX_MESSAGES = client.prefs["networkMaxLines"];
CIRCChannel.prototype.MAX_MESSAGES = client.prefs["channelMaxLines"];
CIRCChanUser.prototype.MAX_MESSAGES = client.prefs["userMaxLines"];
client.MAX_MESSAGES = client.prefs["clientMaxLines"];
client.charset = client.prefs["charset"];
initAliases();
}
function pref_mungeName(name)
{
return escape(name.replace(/\./g, "-").replace(/:/g, "_").toLowerCase());
}
function getNetworkPrefManager(network)
{
function defer(prefName)
{
return client.prefs[prefName];
};
function onPrefChanged(prefName, newValue, oldValue)
{
onNetworkPrefChanged (network, prefName, newValue, oldValue);
};
var logDefault = client.prefManager.logPath.clone();
logDefault.append(escapeFileName(pref_mungeName(network.name)) + ".log");
var prefs =
[
["charset", defer],
["collapseMsgs", defer],
["desc", defer],
["displayHeader", client.prefs["networkHeader"]],
["log", client.prefs["networkLog"]],
["logFileName", logDefault.path],
["motif.current", defer],
["nickname", defer],
["outputWindowURL", defer],
["reconnect", defer],
["username", defer],
["usermode", defer]
];
var branch = "extensions.irc.networks." + pref_mungeName(network.name) +
".";
var prefManager = new PrefManager(branch);
prefManager.addPrefs(prefs);
prefManager.onPrefChanged = onPrefChanged;
network.INITIAL_NICK = prefManager.prefs["nickname"];
network.INITIAL_NAME = prefManager.prefs["username"];
network.INITIAL_DESC = prefManager.prefs["desc"];
network.INITIAL_UMODE = prefManager.prefs["usermode"];
network.stayingPower = prefManager.prefs["reconnect"];
client.prefManagers.push(prefManager);
return prefManager;
}
function getChannelPrefManager(channel)
{
var network = channel.parent.parent;
function defer(prefName)
{
return network.prefs[prefName];
};
function onPrefChanged(prefName, newValue, oldValue)
{
onChannelPrefChanged (channel, prefName, newValue, oldValue);
};
var logDefault = client.prefManager.logPath.clone();
var filename = pref_mungeName(network.name) + "," +
pref_mungeName(channel.name);
logDefault.append(escapeFileName(filename) + ".log");
var prefs =
[
["charset", defer],
["collapseMsgs", defer],
["displayHeader", client.prefs["channelHeader"]],
["log", client.prefs["channelLog"]],
["logFileName", logDefault.path],
["motif.current", defer],
["outputWindowURL", defer]
];
var branch = "extensions.irc.networks." + pref_mungeName(network.name) +
".channels." + pref_mungeName(channel.normalizedName) + "."
var prefManager = new PrefManager(branch);
prefManager.addPrefs(prefs);
prefManager.onPrefChanged = onPrefChanged;
client.prefManagers.push(prefManager);
return prefManager;
}
function getUserPrefManager(user)
{
var network = user.parent.parent;
function defer(prefName)
{
return network.prefs[prefName];
};
function onPrefChanged(prefName, newValue, oldValue)
{
onUserPrefChanged (user, prefName, newValue, oldValue);
};
var logDefault = client.prefManager.logPath.clone();
var filename = pref_mungeName(network.name);
filename += "," + pref_mungeName(user.nick);
logDefault.append(escapeFileName(filename) + ".log");
var prefs =
[
["charset", defer],
["collapseMsgs", defer],
["displayHeader", client.prefs["userHeader"]],
["motif.current", defer],
["outputWindowURL", defer],
["log", client.prefs["userLog"]],
["logFileName", logDefault.path]
];
var branch = "extensions.irc.networks." + pref_mungeName(network.name) +
".users." + pref_mungeName(user.nick) + ".";
var prefManager = new PrefManager(branch);
prefManager.addPrefs(prefs);
prefManager.onPrefChanged = onPrefChanged;
client.prefManagers.push(prefManager);
return prefManager;
}
function destroyPrefs()
{
if ("prefManagers" in client)
{
for (var i = 0; i < client.prefManagers.length; ++i)
client.prefManagers[i].destroy();
}
}
function onPrefChanged(prefName, newValue, oldValue)
{
switch (prefName)
{
case "channelMaxLines":
CIRCChannel.prototype.MAX_MESSAGES = newValue;
break;
case "charset":
client.charset = newValue;
break;
case "clientMaxLines":
client.MAX_MESSAGES = newValue;
case "nickname":
CIRCNetwork.prototype.INITIAL_NICK = newValue;
break;
case "username":
CIRCNetwork.prototype.INITIAL_NAME = newValue;
break;
case "usermode":
CIRCNetwork.prototype.INITIAL_UMODE = newValue;
break;
case "userMaxLines":
CIRCChanUser.prototype.MAX_MESSAGES = newValue;
break;
case "debugMode":
if (newValue.indexOf("e") != -1)
client.debugHook.enabled = true;
else
client.debugHook.enabled = false;
if (newValue.indexOf("c") != -1)
client.dbgContexts = true;
else
delete client.dbgContexts;
if (newValue.indexOf("d") != -1)
client.dbgDispatch = true;
else
delete client.dbgDispatch;
break;
case "desc":
CIRCNetwork.prototype.INITIAL_DESC = newValue;
break;
case "stalkWholeWords":
case "stalkWords":
updateAllStalkExpressions();
break;
case "sortUsersByMode":
if (client.currentObject.TYPE == "IRCChannel")
updateUserList();
case "motif.current":
dispatch("sync-motifs");
break;
case "multiline":
multilineInputMode(newValue);
break;
case "munger.colorCodes":
client.enableColors = newValue;
break;
case "networkMaxLines":
CIRCNetwork.prototype.MAX_MESSAGES = newValue;
break;
case "outputWindowURL":
dispatch("sync-windows");
break;
case "displayHeader":
dispatch("sync-headers");
break;
case "log":
dispatch("sync-logs");
break;
case "aliases":
initAliases();
break;
}
}
function onNetworkPrefChanged(network, prefName, newValue, oldValue)
{
if (network != client.networks[network.name])
{
/* this is a stale observer, remove it */
network.prefManager.destroy();
return;
}
network.updateHeader();
switch (prefName)
{
case "nickname":
network.INITIAL_NICK = newValue;
break;
case "username":
network.INITIAL_NAME = newValue;
break;
case "usermode":
network.INITIAL_UMODE = newValue;
if (network.isConnected())
{
network.primServ.sendData("mode " + network.server.me + " :" +
newValue + "\n");
}
break;
case "desc":
network.INITIAL_DESC = newValue;
break;
case "reconnect":
network.stayingPower = newValue;
break;
case "motif.current":
dispatch("sync-motifs");
break;
case "outputWindowURL":
dispatch("sync-windows");
break;
case "displayHeader":
dispatch("sync-headers");
break;
case "log":
dispatch("sync-logs");
break;
}
}
function onChannelPrefChanged(channel, prefName, newValue, oldValue)
{
var network = channel.parent.parent;
if (network != client.networks[network.name] ||
channel.parent != network.primServ ||
channel != network.primServ.channels[channel.normalizedName])
{
/* this is a stale observer, remove it */
channel.prefManager.destroy();
return;
}
channel.updateHeader();
switch (prefName)
{
case "motif.current":
dispatch("sync-motifs");
case "outputWindowURL":
dispatch("sync-windows");
break;
case "displayHeader":
dispatch("sync-headers");
break;
case "log":
dispatch("sync-logs");
break;
}
}
function onUserPrefChanged(user, prefName, newValue, oldValue)
{
var network = user.parent.parent;
if (network != client.networks[network.name] ||
user.parent != network.primServ ||
user != network.primServ.users[user.name])
{
/* this is a stale observer, remove it */
user.prefManager.destroy();
return;
}
user.updateHeader();
switch (prefName)
{
case "motif.current":
dispatch("sync-motifs");
case "outputWindowURL":
dispatch("sync-windows");
break;
case "displayHeader":
dispatch("sync-headers");
break;
case "log":
dispatch("sync-logs");
break;
}
}
function initAliases()
{
var aliasDefs = client.prefs["aliases"];
for (var i = 0; i < aliasDefs.length; ++i)
{
var ary = aliasDefs[i].split(/\s*=\s*/);
var name = ary[0];
var list = ary[1];
client.commandManager.defineCommand(name, list);
}
}

Просмотреть файл

@ -26,6 +26,14 @@ const RES_PFX = "http://home.netscape.com/NC-irc#";
const nsIRDFResource = Components.interfaces.nsIRDFResource;
const nsIRDFNode = Components.interfaces.nsIRDFNode;
function initRDF()
{
client.rdf = new RDFHelper();
client.rdf.initTree("user-list");
client.rdf.setTreeRoot("user-list", client.rdf.resNullChan);
}
function RDFHelper()
{
const RDF_MEMORYDS_CONTRACTID =
@ -50,6 +58,7 @@ function RDFHelper()
this.resServer = this.svc.GetResource (RES_PFX + "server");
this.resChannel = this.svc.GetResource (RES_PFX + "channel");
this.resChanUser = this.svc.GetResource (RES_PFX + "chanuser");
this.resSortName = this.svc.GetResource (RES_PFX + "sortname");
this.resOp = this.svc.GetResource (RES_PFX + "op");
this.resVoice = this.svc.GetResource (RES_PFX + "voice");
this.resNick = this.svc.GetResource (RES_PFX + "nick");
@ -59,18 +68,16 @@ function RDFHelper()
/* predefined literals */
this.litTrue = this.svc.GetLiteral ("true");
this.litFalse = this.svc.GetLiteral ("false");
this.litUnk = this.svc.GetLiteral ("----");
this.litUnk = this.svc.GetLiteral ("");
this.ds.Assert (this.resNullUser, this.resOp, this.litFalse, true);
this.ds.Assert (this.resNullUser, this.resVoice, this.litFalse, true);
this.ds.Assert (this.resNullUser, this.resNick, this.litUnk, true);
this.ds.Assert (this.resNullUser, this.resUser, this.litUnk, true);
this.ds.Assert (this.resNullUser, this.resHost, this.litUnk, true);
/*
this.ds.Assert (this.resNullChan, this.resChanUser, this.resNullUser, true);
*/
this.ds.Assert (this.resRoot, this.resChannel, this.resNullChan, true);
this.ds.Assert (this.resNullChan, this.resChanUser, this.resNullUser,
true);
}
RDFHelper.prototype.GetResource =
@ -136,10 +143,9 @@ function rdf_change (n1, a, n2)
{
var oldN2 = this.ds.GetTarget (n1, a, true);
if (!oldN2)
if (!ASSERT(oldN2, "Unable to change " + n1.Value + " -[" + a.Value +
"]->, " + "because old value was not found."))
{
dd ("** Unable to change " + n1.Value + " -[" + a.Value + "]->, " +
"because old value was not found.");
return null;
}
@ -175,8 +181,8 @@ function rdf_cleart (n1, a, recurse)
catch (e)
{
/*
dd ("** Caught " + e + " while recursivley clearing " +
n2.Value + " **");
ASSERT(0, "Caught " + e + " while recursivley clearing " +
n2.Value + " **");
*/
}
}

Просмотреть файл

@ -21,6 +21,12 @@
* Robert Ginda, rginda@ndcico.com, original author
*/
/* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
* THIS FILE IS NO LONGER USED. IT'S ONLY IN THE TREE FOR LATER REFERENCE.
* SEE prefs.js IN THIS SAME DIRECTORY INSTEAD.
* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
*/
/*
* currently recognized prefs:
* + extensions.irc.
@ -95,44 +101,47 @@
* <network>
*/
function initPrefs()
function initReadPrefs()
{
client.prefSpecs = {
"nickname": ["CIRCNetwork.prototype.INITIAL_NICK", "IRCMonkey"],
"username": ["CIRCNetwork.prototype.INITIAL_NAME", "chatzilla"],
"desc": ["CIRCNetwork.prototype.INITIAL_DESC", "New Now Know How"],
"reconnect": ["CIRCNetwork.prototype.stayingPower", true],
"multiline": ["client.MULTILINE", false],
"colorCodes": ["client.COLORCODES", false],
"defaultNet": ["client.DEFAULT_NETWORK", "moznet"],
"charset": ["client.CHARSET", ""],
"initialURLs": ["client.INITIAL_URLS", "irc://"],
"initialScripts": ["client.INITIAL_SCRIPTS", ""],
"newTabLimit": ["client.NEW_TAB_LIMIT", 15],
"raiseNewTab": ["client.RAISE_NEW_TAB", false],
"nickCompleteStr": ["client.ADDRESSED_NICK_SEP", ", "],
"stalkWords": ["client.stalkingVictims", []],
"stalkWholeWords": ["client.STALK_WHOLE_WORDS", true],
"deleteOnPart": ["client.DELETE_ON_PART", true],
"stalkBeep": ["client.STALK_BEEP", "beep"],
"msgBeep": ["client.MSG_BEEP", "beep beep"],
"queryBeep": ["client.QUERY_BEEP", "beep"],
"munger": ["client.munger.enabled", true],
"munger.colorCodes": ["client.enableColors", true],
"munger.smileyText": ["client.smileyText", false],
"bugURL": ["client.BUG_URL",
"http://bugzilla.mozilla.org/show_bug.cgi?id=%s"],
"notify.aggressive": ["client.FLASH_WINDOW", true],
"settings.autoSave": ["client.SAVE_SETTINGS", true],
"debug.tracer" : ["client.debugHook.enabled", false],
"style.default": ["client.DEFAULT_STYLE",
"chrome://chatzilla/skin/output-default.css"],
"views.collapseMsgs": ["client.COLLAPSE_MSGS", false],
"views.copyMessages": ["client.COPY_MESSAGES", true],
"views.client.maxlines": ["client.MAX_MESSAGES", 200],
"views.network.maxlines": ["CIRCNetwork.prototype.MAX_MESSAGES", 100],
"views.channel.maxlines": ["CIRCChannel.prototype.MAX_MESSAGES", 300],
"views.chanuser.maxlines": ["CIRCChanUser.prototype.MAX_MESSAGES", 200]
//"nickname": ["CIRCNetwork.prototype.INITIAL_NICK", "IRCMonkey"],
//"username": ["CIRCNetwork.prototype.INITIAL_NAME", "chatzilla"],
//"desc": ["CIRCNetwork.prototype.INITIAL_DESC","New Now Know How"],
//"reconnect": ["CIRCNetwork.prototype.stayingPower", true],
//"multiline": ["client.MULTILINE", false],
//"colorCodes": ["client.COLORCODES", false],
//REMOVED: "defaultNet": ["client.DEFAULT_NETWORK", "moznet"],
//"charset": ["client.CHARSET", ""],
//"initialURLs": ["client.INITIAL_URLS", "irc://"],
//"initialScripts": ["client.INITIAL_SCRIPTS", ""],
//"newTabLimit": ["client.NEW_TAB_LIMIT", 15],
//REMOVED: "raiseNewTab": ["client.RAISE_NEW_TAB", false],
//"nickCompleteStr": ["client.ADDRESSED_NICK_SEP", ", "],
//"stalkWords": ["client.stalkingVictims", []],
//"stalkWholeWords": ["client.STALK_WHOLE_WORDS", true],
//"deleteOnPart": ["client.DELETE_ON_PART", true],
//"stalkBeep": ["client.STALK_BEEP", "beep"],
//"msgBeep": ["client.MSG_BEEP", "beep beep"],
//"queryBeep": ["client.QUERY_BEEP", "beep"],
//REMOVED: "munger": ["client.munger.enabled", true],
//"munger.colorCodes": ["client.enableColors", true],
//REMOVED: "munger.smileyText": ["client.smileyText", false],
//"bugURL": ["client.BUG_URL",
// "http://bugzilla.mozilla.org/show_bug.cgi?id=%s"],
//"notify.aggressive": ["client.FLASH_WINDOW", true],
//REMOVED: "settings.autoSave": ["client.SAVE_SETTINGS", true],
//REMOVED: "debug.tracer" : ["client.debugHook.enabled", false],
//"style.default": ["client.DEFAULT_STYLE",
// "chrome://chatzilla/skin/output-default.css"],
//CHANGED: "views.collapseMsgs": ["client.COLLAPSE_MSGS", false],
//CHANGED: "views.copyMessages": ["client.COPY_MESSAGES", true],
//CHANGED:"views.client.maxlines": ["client.MAX_MESSAGES", 200],
//CHANGED:"views.network.maxlines":
// ["CIRCNetwork.prototype.MAX_MESSAGES", 100],
//CHANGED:"views.channel.maxlines":
// ["CIRCChannel.prototype.MAX_MESSAGES", 300],
//CHANGED:"views.chanuser.maxlines":
// ["CIRCChanUser.prototype.MAX_MESSAGES", 200]
};
const PREF_CTRID = "@mozilla.org/preferences-service;1";
@ -146,9 +155,11 @@ function initPrefs()
var internal = client.prefBranch.QueryInterface(nsIPrefBranchInternal);
internal.addObserver("", client.prefObserver, false);
readPrefs();
}
function destroyPrefs()
function destroyReadPrefs()
{
const nsIPrefBranchInternal = Components.interfaces.nsIPrefBranchInternal;
var internal = client.prefBranch.QueryInterface(nsIPrefBranchInternal);
@ -162,12 +173,6 @@ function pref_observe (prefService, topic, prefName)
{
if (!("prefLock" in client))
readPref(prefName);
if (prefName == "stalkWholeWords" || prefName == "stalkWords")
updateAllStalkExpressions();
if (prefName == "style.default")
onSimulateCommand("/css " + client.DEFAULT_STYLE);
}
function readPref(prefName)
@ -223,8 +228,8 @@ function readPrefs()
for (var p in client.prefSpecs)
readPref(p);
if (!client.INITIAL_URLS)
client.INITIAL_URLS = "irc://";
//if (!client.INITIAL_URLS)
// client.INITIAL_URLS = "irc://";
for (var entry in client.munger.entries)
{
@ -278,7 +283,7 @@ function writePref(prefName)
else if ((ary = prefName.match(/munger\.(.*)/)) &&
ary[1] in client.munger.entries)
{
entry = client.munger.entries[ary[1]];
var entry = client.munger.entries[ary[1]];
if (entry.enabled != entry.enabledDefault)
client.prefBranch.setBoolPref(prefName, entry.enabled);
else

Просмотреть файл

@ -53,14 +53,19 @@
<script src="chrome://chatzilla/content/lib/js/connection-xpcom.js"/>
<script src="chrome://chatzilla/content/lib/js/events.js"/>
<script src="chrome://chatzilla/content/lib/js/command-manager.js"/>
<script src="chrome://chatzilla/content/lib/js/pref-manager.js"/>
<script src="chrome://chatzilla/content/lib/js/message-manager.js"/>
<script src="chrome://chatzilla/content/lib/js/menu-manager.js"/>
<script src="chrome://chatzilla/content/lib/js/irc.js"/>
<script src="chrome://chatzilla/content/lib/js/irc-debug.js"/>
<script src="chrome://chatzilla/content/lib/js/file-utils.js"/>
<script src="chrome://chatzilla/content/lib/xul/munger.js"/>
<script src="chrome://chatzilla/content/commands.js"/>
<script src="chrome://chatzilla/content/static.js"/>
<script src="chrome://chatzilla/content/readprefs.js"/>
<script src="chrome://chatzilla/content/commands.js"/>
<script src="chrome://chatzilla/content/menus.js"/>
<script src="chrome://chatzilla/content/prefs.js"/>
<script src="chrome://chatzilla/content/messages.js"/>
<script src="chrome://chatzilla/content/handlers.js"/>
<script src="chrome://chatzilla/content/rdf.js"/>

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -22,12 +22,72 @@
* Samuel Sieb, samuel@sieb.net, MIRC color codes
*/
function initMunger()
{
client.linkRE =
/((\w[\w-]+):[^<>\[\]()\'\"\s\u201d]+|www(\.[^.<>\[\]()\'\"\s\u201d]+){2,})/;
var munger = client.munger = new CMunger();
munger.addRule ("quote", /(``|'')/, insertQuote);
munger.addRule ("bold", /(?:\s|^)(\*[^*()]*\*)(?:[\s.,]|$)/,
"chatzilla-bold");
munger.addRule ("underline", /(?:\s|^)(\_[^_()]*\_)(?:[\s.,]|$)/,
"chatzilla-underline");
munger.addRule ("italic", /(?:\s|^)(\/[^\/()]*\/)(?:[\s.,]|$)/,
"chatzilla-italic");
/* allow () chars inside |code()| blocks */
munger.addRule ("teletype", /(?:\s|^)(\|[^|]*\|)(?:[\s.,]|$)/,
"chatzilla-teletype");
munger.addRule (".mirc-colors", /(\x03((\d{1,2})(,\d{1,2}|)|))/,
mircChangeColor);
munger.addRule (".mirc-bold", /(\x02)/, mircToggleBold);
munger.addRule (".mirc-underline", /(\x1f)/, mircToggleUnder);
munger.addRule (".mirc-color-reset", /(\x0f)/, mircResetColor);
munger.addRule (".mirc-reverse", /(\x16)/, mircReverseColor);
munger.addRule ("ctrl-char", /([\x01-\x1f])/, showCtrlChar);
munger.addRule ("link", client.linkRE, insertLink);
munger.addRule ("mailto",
/(?:\s|\W|^)((mailto:)?[^<>\[\]()\'\"\s\u201d]+@[^.<>\[\]()\'\"\s\u201d]+\.[^<>\[\]()\'\"\s\u201d]+)/i,
insertMailToLink);
munger.addRule ("bugzilla-link", /(?:\s|\W|^)(bug\s+#?\d{3,6})/i,
insertBugzillaLink);
munger.addRule ("channel-link",
/(?:\s|\W|^)[@+]?(#[^<>\[\](){}\"\s\u201d]*[^:,.<>\[\](){}\'\"\s\u201d])/i,
insertChannelLink);
munger.addRule ("face",
/((^|\s)[\<\>]?[\;\=\:]\~?[\-\^\v]?[\)\|\(pP\<\>oO0\[\]\/\\](\s|$))/,
insertSmiley);
munger.addRule ("ear", /(?:\s|^)(\(\*)(?:\s|$)/, insertEar, false);
munger.addRule ("rheet", /(?:\s|\W|^)(rhee+t\!*)(?:\s|$)/i, insertRheet);
munger.addRule ("word-hyphenator",
new RegExp ("(\\S{" + client.MAX_WORD_DISPLAY + ",})"),
insertHyphenatedWord);
client.enableColors = client.prefs["munger.colorCodes"];
for (var entry in client.munger.entries)
{
var branch = client.prefManager.prefBranch;
if (entry[0] != ".")
{
try
{
munger.entries[entry].enabled =
branch.getBoolPref("munger." + entry);
}
catch (ex)
{
// nada
}
}
}
}
function CMungerEntry (name, regex, className, enable, tagName)
{
this.name = name;
if (name[0] != ".")
this.description = getMsg("rule_" + name);
this.description = getMsg("munger." + name, null, null);
this.enabled = (typeof enable == "undefined" ? true : enable);
this.enabledDefault = this.enabled;
this.tagName = (tagName) ? tagName : "html:span";
@ -41,14 +101,13 @@ function CMungerEntry (name, regex, className, enable, tagName)
this.lambdaReplace = className;
else
this.className = className;
}
function CMunger ()
{
this.entries = new Object();
this.tagName = "html:span";
this.enabled = true;
}
CMunger.prototype.enabled = true;
@ -56,17 +115,13 @@ CMunger.prototype.enabled = true;
CMunger.prototype.addRule =
function mng_addrule (name, regex, className, enable)
{
this.entries[name] = new CMungerEntry (name, regex, className, enable);
}
CMunger.prototype.delRule =
function mng_delrule (name)
{
delete this.entries[name];
}
CMunger.prototype.munge =
@ -77,9 +132,11 @@ function mng_munge (text, containerTag, data)
var wbr, newClass;
if (!containerTag)
{
containerTag =
document.createElementNS ("http://www.w3.org/1999/xhtml",
this.tagName);
}
if (this.enabled)
{
@ -148,18 +205,6 @@ function mng_munge (text, containerTag, data)
this.entries[entry].enabled = false;
this.munge(ary[1], subTag, data);
this.entries[entry].enabled = true;
/*
var wordParts = splitLongWord (ary[1],
client.MAX_WORD_DISPLAY);
for (var i in wordParts)
{
subTag.appendChild (document.createTextNode (wordParts[i]));
wbr = document.createElementNS ("http://www.w3.org/1999/xhtml",
"html:wbr");
subTag.appendChild (wbr);
}
*/
containerTag.appendChild (subTag);
@ -210,5 +255,4 @@ function mng_munge (text, containerTag, data)
containerTag.appendChild (textNode);
return containerTag;
}

Просмотреть файл

@ -1,3 +1,7 @@
<!ENTITY Menubar.tooltip "Main Menu">
<!ENTITY Toolbar.tooltip "Main Toolbar">
<!ENTITY menuBar.tooltip "Menu Bar">
<!ENTITY header.tooltip "Headers">
<!ENTITY op.value "Op">

Просмотреть файл

@ -28,418 +28,596 @@ na=<n/a>
# command.js
aboutUsage=
aboutHelp=Display information about this version of ChatZilla.
cmd.about.label = About ChatZilla
cmd.about.help = Display information about this version of ChatZilla.
attachUsage=<url>
attachHelp=Attaches to the IRC URL specified by <url>. If you are already attached, the view for <url> is made current. If that view has been deleted, it is recreated. You may omit the irc:// portion of the <url>. Examples are; /attach moznet, /attach moznet/chatzilla, and /attach irc.mozilla.org/mozbot,isnick.
cmd.alias.params = [<alias-name> <command-list>]
cmd.alias.help = Defines <alias-name> as an alias for the semicolon (';') delimited list of commands specified by <command-list>. If <command-list> is a minus ('-') character, the alias will be removed. If <alias-name> is not provided, all aliases will be listed.
awayUsage=[<reason>]
awayHelp=If <reason> is specified, sets you away with that message. Used without <reason>, you are marked back as no longer being away.
cmd.attach.params = <irc-url>
cmd.attach.help = Attaches to the IRC URL specified by <irc-url>. If you are already attached, the view for <irc-url> is made current. If that view has been deleted, it is recreated. You may omit the irc:// portion of the <irc-url>. Examples are; /attach moznet, /attach moznet/chatzilla, and /attach irc.mozilla.org/mozbot,isnick.
cancelUsage=
cancelHelp=Cancels a /attach or /server command. Use /cancel when ChatZilla is repeatedly trying to attach to a network that is not responding, to tell ChatZilla to give up before the normal number of retries.
cmd.away.params = [<reason>]
cmd.away.help = If <reason> is specified, sets you away with that message. Used without <reason>, you are marked back as no longer being away.
charsetUsage=[<charset>]
charsetHelp=Sets the character encoding mode to <charset>, or displays the current character encoding mode if <charset> is not provided.
cmd.cancel.help = Cancels a /attach or /server command. Use /cancel when ChatZilla is repeatedly trying to attach to a network that is not responding, to tell ChatZilla to give up before the normal number of retries.
channel-charsetUsage=[<charset>]
channel-charsetHelp=Sets the character encoding mode to <charset>, or displays the current character encoding mode if <charset> is not provided.
cmd.charset.params = [<new-charset>]
cmd.charset.help = Sets the character encoding mode to <new-charset>, or displays the current character encoding mode if <new-charset> is not provided.
clearUsage=
clearHelp=Clear the current view, discarding *all* content.
cmd.channel-charset.params = [<new-charset> [<channel>]]
cmd.channel-charset.help = Sets the character encoding mode to <new-charset>, or displays the current character encoding mode if <new-charset> is not provided. If <channel> is not provided, the current channel will be assumed.
clientUsage=
clientHelp=Make the ``*client*'' view current. If the ``*client*'' view has been deleted, it will be recreated.
cmd.channel-motif.params = [<motif> [<channel>]]
cmd.channel-motif.help = Sets the CSS file used for the message tab for this specific channel. <motif> can be a URL to a .css file, or the shortcut "default", "light", or "dark". If <motif> is a minus ('-') character, the motif will revert to the network motif. If <channel> is not provided, the current channel will be assumed. See the the ChatZilla homepage at <http://www.mozilla.org/projects/rt-messaging/chatzilla/> for more information on how to style ChatZilla. See also |motif|.
commandsUsage=[<pattern>]
commandsHelp=Lists all command names matching <pattern>, or all command names if pattern is not specified.
cmd.channel-pref.params = [<pref-name> [<pref-value> [<delete-pref> [<channel>]]]]
cmd.channel-pref.help = Sets the value of the preference named <pref-name> to the value of <pref-value> on the channel <channel>. If <pref-value> is not provided, the current value of <pref-name> will be displayed. If both <pref-name> and <pref-value> are omitted, all preferences will be displayed. If <delete-pref> is provided and is |true|, |on|, |yes|, or |1|, or if <pref-name> starts with a minus ('-') character, then the preference will revert back to its default value. If <channel> is not provided, the current channel is assumed.
cssUsage=[light | dark | default | none | <url>]
cssHelp=Sets or displays the CSS file used for output. See the the ChatZilla homepage at <http://www.mozilla.org/projects/rt-messaging/chatzilla/> for more information on how to style ChatZilla.
cmd.clear-view.label = Cl&ear This Tab
cmd.clear-view.params = [<view>]
cmd.clear-view.help = Clear the current view, discarding *all* content.
ctcpUsage=<target> <code> [<params>]
ctcpHelp=Sends the CTCP code <code> to the target (user or channel) <target>. If <params> are specified they are sent along as well.
cmd.client.help = Make the ``*client*'' view current. If the ``*client*'' view has been deleted, it will be recreated.
deleteUsage=
deleteHelp=Clear the current view, discarding *all* content, and drop its icon from the tab strip.
cmd.commands.params = [<pattern>]
cmd.commands.help = Lists all command names matching <pattern>, or all command names if pattern is not specified.
deopUsage=<nick>
deopHelp=Removes operator status from <nick> on current channel. Requires operator status.
cmd.sync-motifs.help = Syncronizes all views with their current motif setting.
cmd.sync-logs.help = Syncronizes all views with their current logging setting.
cmd.sync-windows.help = Syncronizes all views with their current output window setting.
cmd.sync-headers.help = Syncronizes all views with their current header display setting.
descUsage=<description>
descHelp=Changes the 'ircname' line returned when someone performs a /whois on you. You must specify this *before* connecting to the network.
cmd.ctcp.params = <target> <code> [<params>]
cmd.ctcp.help = Sends the CTCP code <code> to the target (user or channel) <target>. If <params> are specified they are sent along as well.
devoiceUsage=<nick>
devoiceHelp=Removes voice status from <nick> on current channel. Requires operator status.
cmd.delete-view.key = accel W
cmd.delete-view.label = &Close Tab
cmd.delete-view.params = [<view>]
cmd.delete-view.help = Clear the current view, discarding *all* content, and drop its icon from the tab strip.
disconnectUsage=[<reason>]
disconnectHelp=Disconnects from the server represented by the active view when the command is executed providing the reason <reason> or the default reason if <reason> is not specified.
cmd.deop.format = Remove Operator Status from $nickname
cmd.deop.label = Remove Operator Status
cmd.deop.params = <nickname> [<...>]
cmd.deop.help = Removes operator status from <nickname> on current channel. Requires operator status.
echoUsage=<text>
echoHelp=Displays <text> in the current view, but does not send it to the server.
cmd.desc.params = <description>
cmd.desc.help = Changes the 'ircname' line returned when someone performs a /whois on you. You must specify this *before* connecting to the network.
evalUsage=<script>
evalHelp=Evaluates <script> as JavaScript code. Not for the faint of heart.
cmd.devoice.format = Remove Voice Status from $nickname
cmd.devoice.label = Remove Voice Status
cmd.devoice.params = <nickname> [<...>]
cmd.devoice.help = Removes voice status from <nickname> on current channel. Requires operator status.
exitUsage=[<reason>]
exitHelp=Disconnects from all active servers and networks, providing the reason <reason>, or the default reason if <reason> is not specified. Exits ChatZilla after disconnecting.
cmd.disconnect.format = Disconnect From $networkName
cmd.disconnect.label = Disconnect
cmd.disconnect.params = [<reason>]
cmd.disconnect.help = Disconnects from the server represented by the active view when the command is executed providing the reason <reason> or the default reason if <reason> is not specified.
headersUsage=
headersHelp=Toggles visiblility of the header bar.
cmd.echo.params = <message>
cmd.echo.help = Displays <message> in the current view, but does not send it to the server.
helpUsage=[<command-name>]
helpHelp=Displays help on all commands matching <command-name>, if <command-name> is not given, displays help on all commands.
cmd.enable-plugin.params = <plugin>
cmd.enable-plugin.help = Meant to be used to re-enable a plugin after calling |disable-plugin|, this command calls the plugin's enablePlugin function. There are no guarantees that the plugin will properly enable itself.
hideUsage=
hideHelp=Drop the current view's icon from the tab strip, but save its contents. The icon will reappear the next time there is activity on the view.
infobarUsage=
infobarHelp=Toggles the visibility of the username list.
cmd.eval.params = <expression>
cmd.eval.help = Evaluates <expression> as JavaScript code. Not for the faint of heart.
inviteUsage=<nick> [<channel>]
inviteHelp=Invites <nick> to <channel> or current channel if not supplied. Requires operator status if +i is set.
cmd.exit.params = [<reason>]
cmd.exit.help = Disconnects from all active servers and networks, providing the reason <reason>, or the default reason if <reason> is not specified. Exits ChatZilla after disconnecting.
jUsage=[#|&|+]<channel-name> [<key>]
jHelp=This command is an alias for /join.
cmd.focus-input.key = VK_ESCAPE
cmd.focus-input.help = Force keyboard focus to the input box.
joinUsage=[#|&|+]<channel-name> [<key>]
joinHelp=Joins a the global (name starts with #), local (name starts with &), or modeless (name starts with a +) channel named <channel-name>. If no prefix is given, # is assumed. Provides the key <key> if specified.
cmd.goto-url.label = Open Link
cmd.goto-url.params = <url>
cmd.goto-url.help = Navigate to the url specified by <url>. If the <url> is not an irc: url, it will be opened in the most recent browser window.
join-charsetUsage=[#|&|+]<channel-name> <charset> [<key>]
join-charsetHelp=Joins a the global (name starts with #), local (name starts with &), or modeless (name starts with a +) channel named <channel-name>. Messages will be encoded and decoded according for the character set specified by <charset>. The <charset> parameter is independent of the default character set, which can be selected with the /charset command. If no prefix is given, # is assumed. Provides the key <key> if specified.
cmd.goto-url-newwin.label = Open Link in New Window
cmd.goto-url-newwin.params = <url>
cmd.goto-url-newwin.help = Navigate to the url specified by <url>. If the <url> is not an irc: url, it will be opened in a new browser window.
kickUsage=[<channel>] <nick>
kickHelp=Kicks <nick> from <channel> or current channel if not supplied. Requires operator status.
cmd.goto-url-newtab.label = Open Link in New Tab
cmd.goto-url-newtab.params = <url>
cmd.goto-url-newtab.help = Navigate to the url specified by <url>. If the <url> is not an irc: url, it will be opened in a new tab in the most recent browser window.
leaveUsage=
leaveHelp=Leaves the current channel, use /delete or /hide to force the view to go away.
cmd.header.help = Toggles visiblility of the header bar.
listUsage=[channel]
listHelp=Lists channel name, user count, and topic information for the network/server you are attached to. If you omit the optional channel argument, all channels will be listed. On large networks, the server may disconnect you for asking for a complete list.
cmd.help.params = [<pattern>]
cmd.help.help = Displays help on all commands matching <pattern>, if <pattern> is not given, displays help on all commands.
logUsage=on | off
logHelp=Turns logging on or off for the current channel. The state will be saved in prefs, so that if logging is on when you close chatzilla, it will resume logging the next time you join the channel.
cmd.hide-view.params = [<view>]
cmd.hide-view.help = Drop the current view's icon from the tab strip, but save its contents. The icon will reappear the next time there is activity on the view.
rlistUsage=<regexp>
rlistHelp=Lists channel name, user count, and topic information for the network/server you are attached to, filtered by the regular expression.
cmd.toggle-ui.params = <thing>
cmd.toggle-ui.help = Toggles the visibility of various pieces of the user interface. <thing> must be one of: tabstrip, userlist, header, status.
meUsage=<action>
meHelp=Performs an 'action' on the current channel.
cmd.userlist.label = User List
cmd.userlist.key = accel shift L
msgUsage=<user> <msg>
msgHelp=Sends a private message <msg> to the user <user>.
cmd.tabstrip.label = Tab Strip
cmd.tabstrip.key = accel shift T
nameUsage=<username>
nameHelp=Changes the username displayed before your hostmask if the server you're connecting to allows it. Some servers will only trust the username reply from the ident service. You must specify this *before* connecting to the network.
cmd.statusbar.label = Status Bar
cmd.statusbar.key = accel shift S
namesUsage=[<channel>]
namesHelp=Lists the users in a channel.
cmd.header.label = Header
cmd.header.key = accel shift H
networkUsage=<network-name>
networkHelp=Sets the current network to <network-name>
cmd.toggle-pref.params = <pref-name>
cmd.toggle-pref.help = Toggles the boolean preference specified by <pref-name>.
networksUsage=
networksHelp=Lists all available networks as clickable links.
cmd.toggle-usort.label = Sort Users By Mode
cmd.toggle-ccm.label = Collapse Co&nsecutive Messages
cmd.toggle-copy.label = Copy &Important Messages
nickUsage=<nickname>
nickHelp=Changes your current nickname.
cmd.userlist.help = Toggles the visibility of the user list.
notifyUsage=[<nickname> [...]]
notifyHelp=With no parameters, /notify shows you the online/offline status of all the users on your notify list. If one or more <nickname> parameters are supplied, the nickname(s) will be added to your notify list if they are not yet on it, or removed from it if they are.
cmd.invite.params = <nickname> [<channel-name>]
cmd.invite.help = Invites <nickname> to <channel-name> or current channel if not supplied. Requires operator status if +i is set.
opUsage=<nick>
opHelp=Gives operator status to <nick> on current channel. Requires operator status.
cmd.j.params = <channel-name> [<key>]
cmd.j.help = This command is an alias for /join.
partUsage=
partHelp=See /leave
cmd.join.params = <channel-name> [<key>]
cmd.join.help = Joins the global (name starts with #), local (name starts with &), or modeless (name starts with a +) channel named <channel-name>. If no prefix is given, # is assumed. Provides the key <key> if specified.
pingUsage=<nick> | <channel>
pingHelp=Attempts to measure the time it takes to send a message to the user <nick>, and receive a response. Specifiying a <channel> instead is the same a pinging every person on the channel. Their IRC client may or may not show them that you've asked for this information. ChatZilla currently does not.
cmd.join-charset.params = [<channel-name> <charset> [<key>]]
cmd.join-charset.help = Joins the global (name starts with #), local (name starts with &), or modeless (name starts with a +) channel named <channel-name>. Messages will be encoded and decoded according for the character set specified by <charset>. The <charset> parameter is independent of the default character set, which can be selected with the /charset command. If no prefix is given, # is assumed. Provides the key <key> if specified.
queryUsage=<user> [<msg>]
queryHelp=Opens a one-on-one chat with <user>. If <msg> is supplied, it is sent as the initial private message to <user>.
cmd.kick.format = Kick $nickname from $channelName
cmd.kick.label = Kick
cmd.kick.params = <nickname> [<reason>]
cmd.kick.help = Kicks <nickname> off the current channel. Requires operator status.
quitUsage=[<reason>]
quitHelp=This command has been replaced by /disconnect.
cmd.kick-ban.format = Kickban $nickname from $channelName
cmd.kick-ban.label = Kickban
cmd.kick-ban.params = <nickname> [<reason>]
cmd.kick-ban.help = Bans *!username@hostmask from the current channel, then kicks them off. Requires operator status.
quoteUsage=<irc-command>
quoteHelp=Sends a raw command to the IRC server, not a good idea if you don't know what you're doing. see IRC 1459 <http://www.irchelp.org/irchelp/rfc1459.html> for complete details.
cmd.leave.format = Leave $channelName
cmd.leave.label = Leave
cmd.leave.params = [<channel-name> [<no-delete>]
cmd.leave.help = Leaves the current channel, use /delete or /hide to force the view to go away. If <no-delete> is provided and is |true|, |on|, |yes|, or |1|, the the tab will not be deleted.
serverUsage=<server-hostname> [<port>] [<password>]
serverHelp=Connects to server <server-hostname> on <port>, or 6667 if <port> is not specified. Provides the password <password> if specified. If you are already connected, the view for <server-hostname> is made current. If that view has been deleted, it is recreated.
cmd.list.params = [<channel-name>]
cmd.list.help = Lists channel name, user count, and topic information for the network/server you are attached to. If you omit the optional channel argument, all channels will be listed. On large networks, the server may disconnect you for asking for a complete list.
squeryUsage=<service> [<commands>]
squeryHelp=Sends the commands <commands> to the service <service>.
cmd.list-plugins.params = [<plugin>]
cmd.list-plugins.help = If <plugin> is not provided, this command lists information on all loaded plugins. If <plugin> is provided, only its information will be displayed. If this command is dispatched from the console, you may specify <plugin> by either the plugin id, or index.
stalkUsage=<text>
stalkHelp=Add text to list of words for which you would like to see alerts. Whenever a person with a nickname matching <text> speaks, or someone says a phrase containing <text>, your ChatZilla window will become active (on some operating systems) and its taskbar icon will flash (on some operating systems.)
cmd.load.params = <url>
cmd.load.help = Executes the contents of the url specified by <url>. See also: The |initialScripts| pref.
statusUsage=
statusHelp=Shows status information for the current view.
cmd.log.params = [<state>]
cmd.log.help = Turns logging on or off for the current channel. If <state> is provided and is |true|, |on|, |yes|, or |1|, logging will be turned on. Values |false|, |off|, |no| and |0| will turn logging off. Ommit <state> to see the current logging state. The state will be saved in prefs, so that if logging is on when you close chatzilla, it will resume logging the next time you join the channel.
statusbarUsage=
statusbarHelp=Toggles the visibility of the status bar.
cmd.rlist.params = <regexp>
cmd.rlist.help = Lists channel name, user count, and topic information for the network/server you are attached to, filtered by the regular expression.
testdisplayUsage=
testdisplayHelp=Displays a sample text. Used to preview styles.
cmd.reload-ui.help = Reload the ChatZilla XUL file. Used during development.
topicUsage=[<new-topic>]
topicHelp=If <new-topic> is specified and you are a chanop, or the channel is not in 'private topic' mode (+t), the topic will be changed to <new-topic>. If <new-topic> is *not* specified, the current topic will be displayed.
cmd.me.params = <action>
cmd.me.help = Performs an 'action' on the current channel.
tabstripUsage=
tabstripHelp=Toggles the visibility of the channel tab strip.
cmd.motif.params = [<motif>]
cmd.motif.help = Sets the default CSS file used for the message tabs. <motif> can be a URL to a .css file, or the shortcut "default", "light", or "dark". See the the ChatZilla homepage at <http://www.mozilla.org/projects/rt-messaging/chatzilla/> for more information on how to style ChatZilla. See also |network-motif|, |channel-motif|, |user-motif|.
unstalkUsage=<text>
unstalkHelp=Remove word from list of terms for which you would like to see alerts.
cmd.motif-default.label = &Default Motif
cmd.motif-dark.label = Dar&k Motif
cmd.motif-light.label = &Light Motif
versionUsage=<nick>
versionHelp=Asks <nick> what irc client they're running. Their IRC client may or may not show them that you've asked for this information. ChatZilla currently does not.
cmd.msg.params = <nickname> <message>
cmd.msg.help = Sends a private message <msg> to <nickname>.
voiceUsage=<nick>
voiceHelp=Gives voice status to <nick> on current channel. Requires operator status.
cmd.name.params = <username>
cmd.name.help = Changes the username displayed before your hostmask if the server you're connecting to allows it. Some servers will only trust the username reply from the ident service. You must specify this *before* connecting to the network.
whoUsage=<pattern>
whoHelp=List users who have name, host, or description information matching <pattern>.
cmd.names.params = [<channel-name>]
cmd.names.help = Lists the users in a channel.
whoisUsage=<nick>
whoisHelp=Displays information about the user <nick>, including 'real name', server connected to, idle time, and signon time. Note that some servers will lie about the idle time.
cmd.network.params = <network-name>
cmd.network.help = Sets the current network to <network-name>
whowasUsage=<nick-pattern>
whowasHelp=List brief information for users with a nickname matching <nick-pattern> who have recently logged on to the IRC network.
cmd.networks.help = Lists all available networks as clickable links.
# static.js
commaSpace=,%S
defaultStatus=Welcome to ChatZilla!
defaultNick=IRCMonkey
responseCodeMapHello=[HELLO]
responseCodeMapHelp=[HELP]
responseCodeMapUsage=[USAGE]
responseCodeMapError=[ERROR]
responseCodeMapWarning=[WARNING]
responseCodeMapInfo=[INFO]
responseCodeMapEvalIn=[EVAL-IN]
responseCodeMapEvalOut=[EVAL-OUT]
clientname=*client*
circnetworkInitialDesc=New Now Know How
circserverVersionRply=Chatzilla %S [%S]
welcome=Welcome to ChatZilla...\nUse /attach <network-name> to connect to a network, or click on one of the network names below.\nFor general IRC help and FAQs, please go to <http://www.irchelp.org>, for information about ChatZilla go to <http://www.mozilla.org/projects/rt-messaging/chatzilla/>.
arraySpeakAnd=and
noStyle=None
gotoIRCURLCharWarning=The character, ``%S'', should be written as ``%S'' when used in URLs, <%S>.
badIRCURL=Invalid IRC URL ``%S''
gotoIRCURLMsg2=Enter a password for the url %S
gotoIRCURLMsg3=Enter key for url %S
gotoIRCURLMsg4=Network view for ``%S'' opened.
userCountDetails=%S, %S@, %S+
updateTitleNetwork=User %S on ``%S'' (%S:%S)
updateTitleNetwork2=User %S, not connected to network ``%S''
updateTitleNoNick=<unregistered-user>
updateTitleNoTopic=No Topic
updateTitleNoMode=No Mode
updateTitleChannel=%S on %S (%S): %S
updateTitleUser=Conversation with %S <%S>
updateTitleUnknown=ChatZilla!
updateTitleWithActivity=%S -- Activity [%S]
tabdnd_drop=Would you like to use the file ``%S'' as your new motif?
cli_attachNoNet=Unknown network ``%S''
cli_attachOpened=Network view for ``%S'' opened.
cli_attachAlreadyThere=You are already connected to ``%S''.
cli_attachGetNick=Please select a nickname
cli_attachWorking=Attempting to connect to ``%S''. Use /cancel to abort.
deleteTabMsg=Current view cannot be deleted.
cli_loadLoading=Loading subscript ``%S''
cli_loadError=Error loading subscript, line %S of ``%S'': %S
cli_sayMsg=No default action for objects of type ``%S''
cli_statusString=%S/%S %S:%S, %S
cli_dateString=%S/%S %S:%S
cmd.network-charset.params = [<new-charset> [<network>]]
cmd.network-charset.help = Sets the character encoding mode to <new-charset>, or displays the current character encoding mode if <new-charset> is not provided. If <networks> is not provided, the current network will be assumed.
# handlers.js
cli_closing=Disconnecting from IRC. Click close again to exit now.
onNotImplementedMsg=``We're accepting patches''
debug_on=Debug mode is now on.
debug_off=Debug mode is now off.
onDoStyleChangeMsg=Enter stylesheet filename (relative to chrome://chatzilla/skin/)
onDeleteViewMsg=Cannot delete last view.
onClearCurrentViewMsg=Messages Cleared.
tabCompleteError=No match for ``%S''
tabCompleteList=%S matches for ``%S'': [%S]
cli_icancelMsg=/cancel cannot be used from this view.
cli_icancelMsg2=No connection in progress, nothing to cancel.
cli_icancelMsg3=Cancelling connection to ``%S''...
cli_currentCharset=Character encoding mode is now ``%S''.
cli_charsetError=Invalid character encoding mode ``%S''.
cli_icommandMsg=Unknown command ``%S'', just guessing.
cli_icommandMsg2=Unknown command ``%S''.
cli_icommandMsg3=Sorry, ``%S'' has not been implemented.
cli_icommandMsg4=Ambiguous command: ``%S''
cli_icommandMsg5=%S commands match: %S
cli_icss=Using CSS file ``%S''
onInputSimpleCommandMsg=``%S'' cannot be used from this view.
cli_istatusClient=Default nickname, ``%S'', username ``%S'', and description ``%S''.
cli_istatusPrimary=primary
cli_istatusSecondary=secondary
cli_istatusServerOn=%S: User %S connected via %S:%S (%S server).
cli_istatusServerOff=%S: Not connected.
cli_istatusServerDetail=%S: Connected for %S, last ping: %S, server roundtrip (lag): %S seconds.
cli_istatusMember=Member
cli_istatusOperator=Operator member
cli_istatusVoiced=Voiced member
cli_istatusBoth=Operator and voiced member
cli_istatusNoMode=no mode
cli_istatusChannelTopic=%S, %S: Topic, ``%S''
cli_istatusChannelNoTopic=%S, %S: No topic.
cli_istatusChannelOn=%S: %S of %S (%S) <%S>
cli_istatusChannelDetail=%S/%S: %S users total, %S operators, %S voiced.
cli_istatusChannelOff=%S: No longer a member of %S.
cli_istatusEnd=End of status.
cli_ihelpMsg=No such command, ``%S''.
cli_testdisplayYou=you
cli_testdisplayMsg=Sample HELLO message, <http://testurl.com/foo.html>.
cli_testdisplayMsg2=Sample INFO message, <http://testurl.com/foo.html>.
cli_testdisplayMsg3=Sample ERROR message, <http://testurl.com/foo.html>.
cli_testdisplayMsg4=Sample HELP message, <http://testurl.com/foo.html>.
cli_testdisplayMsg5=Sample USAGE message, <http://testurl.com/foo.html>.
cli_testdisplayMsg6=Sample STATUS message, <http://testurl.com/foo.html>.
cli_testdisplayMsg7=Normal message from %S to %S, <http://testurl.com/foo.html>.
cli_testdisplayMsg8=Action message from %S to %S, <http://testurl.com/foo.html>.
cli_testdisplayMsg9=Notice message from %S to %S, <http://testurl.com/foo.html>.
cli_testdisplayMsg10=Sample URL <http://www.mozilla.org> message.
cli_testdisplayMsg11=Sample text styles *bold*, _underline_, /italic/, |teletype| message.
cli_testdisplayMsg12=Sample emoticon :) :( :~( :0 :/ :P :| (* message.
cli_testdisplayMsg13=Sample Rheeeeeeeeeet! message.
cli_testdisplayMsg14=Sample Topic message, <http://testurl.com/foo.html>.
cli_testdisplayMsg15=Sample Join message, <http://testurl.com/foo.html>.
cli_testdisplayMsg16=Sample Part message, <http://testurl.com/foo.html>.
cli_testdisplayMsg17=Sample Kick message, <http://testurl.com/foo.html>.
cli_testdisplayMsg18=Sample Quit message, <http://testurl.com/foo.html>.
cli_testdisplayMsg19=%S : Sample /stalk match, <http://testurl.com/foo.html>.
cli_testdisplayMsg20=Sample control char >%01<\\1 -- >%05<\\5 -- >%10<\\10
cli_testdisplayMsg21=Sample color %033c%034o%034l%033o%033r%034%20%036t%036e%032s%034t%0f message.
cli_testdisplayMsg22=Sample ``double quote'' message.
cli_inetworkMsg=Unknown network ``%S''
cli_listNetworks.a=Available networks are [
cli_listNetworks.b=].
cli_iserverMsg=Already connected to %S
cli_quitMsg=Quit can only be used in the context of a network.
cli_quitMsg2=Not connected
cli_inamesMsg=/names cannot be used from this view.
cli_inamesMsg2=Network ``%S'' is not connected.
cmd.network-motif.params = [<motif> [<network>]]
cmd.network-motif.help = Sets the CSS file used for the message tab for the network <network>. <motif> can be a URL to a .css file, or the shortcut "default", "light", or "dark". If <motif> is a minus ('-') character, the motif will revert to the global motif. If <network> is not provided, the current network is assumed. See the the ChatZilla homepage at <http://www.mozilla.org/projects/rt-messaging/chatzilla/> for more information on how to style ChatZilla. See also |motif|.
cmd.network-pref.params = [<pref-name> [<pref-value> [<delete-pref> [<network>]]]]
cmd.network-pref.help = Sets the value of the preference named <pref-name> to the value of <pref-value> on the network <network>. If <pref-value> is not provided, the current value of <pref-name> will be displayed. If both <pref-name> and <pref-value> are omitted, all preferences will be displayed. If <delete-pref> is provided and is |true|, |on|, |yes|, or |1|, or if <pref-name> starts with a minus ('-') character, then the preference will revert back to its default value. If <network> is not provided, the current network is assumed.
cmd.nick.params = <nickname>
cmd.nick.help = Changes your current nickname.
cmd.notify.params = [<nickname> [<...>]]
cmd.notify.help = With no parameters, /notify shows you the online/offline status of all the users on your notify list. If one or more <nickname> parameters are supplied, the nickname(s) will be added to your notify list if they are not yet on it, or removed from it if they are.
cmd.op.format = Give Operator Status to $nickname
cmd.op.label = Give Operator Status
cmd.op.params = <nickname> [<...>]
cmd.op.help = Gives operator status to <nickname> on current channel. Requires operator status.
cmd.open-at-startup.params = [<toggle>]
cmd.open-at-startup.help = Used to add the current view to the list of views that will be automatically opened at startup. If <toggle> is not provided, the status of the current view will be displayed. <toggle> can be one of: yes, on, true, 1, no, off, false, 0, or toggle, to toggle the current state.
cmd.toggle-oas.format = Open This $viewType at Startup
cmd.toggle-oas.label = Open at Startup
cmd.ping.params = <target>
cmd.ping.help = Attempts to measure the time it takes to send a message to the user nickname, and receive a response. Specifiying a channel instead is the same a pinging every person on the channel. Their IRC client may or may not show them that you've asked for this information. ChatZilla currently does not.
cmd.pref.params = [<pref-name> [<pref-value> [<delete-pref>]]]
cmd.pref.help = Sets the value of the preference named <pref-name> to the value of <pref-value>. If <pref-value> is not provided, the current value of <pref-name> will be displayed. If both <pref-name> and <pref-value> are omitted, all preferences will be displayed. If <delete-pref> is provided and is |true|, |on|, |yes|, or |1|, or if <pref-value> is a minus ('-') character, then the preference will revert back to its default value.
cmd.query.format = Open Private Chat with $nickname
cmd.query.label = Open Private Chat
cmd.query.params = <nickname> [<message>]
cmd.query.help = Opens a one-on-one chat with <nickname>. If <message> is supplied, it is sent as the initial private message to <nickname>.
cmd.quit.label = Close &Window
cmd.quit.params = [<reason>]
cmd.quit.help = Quit ChatZilla.
cmd.exit-mozilla.label = &Exit
cmd.exit-mozilla.key = accel Q
cmd.quit-mozilla.label = &Quit
cmd.quit-mozilla.key = accel Q
cmd.quit-mozilla.help = Quit Mozilla.
cmd.quote.params = <irc-command>
cmd.quote.help = Sends a raw command to the IRC server, not a good idea if you don't know what you're doing. see IRC 1459 <http://www.irchelp.org/irchelp/rfc1459.html> for complete details.
cmd.server.params = <hostname> [<port> [<password>]]
cmd.server.help = Connects to server <hostname> on <port>, or 6667 if <port> is not specified. Provides the password <password> if specified. If you are already connected, the view for <hostname> is made current. If that view has been deleted, it is recreated.
cmd.squery.params = <service> [<commands>]
cmd.squery.help = Sends the commands <commands> to the service <service>.
cmd.stalk.params = <text>
cmd.stalk.help = Add text to list of words for which you would like to see alerts. Whenever a person with a nickname matching <text> speaks, or someone says a phrase containing <text>, your ChatZilla window will become active (on some operating systems) and its taskbar icon will flash (on some operating systems.)
cmd.status.help = Shows status information for the current view.
cmd.statusbar.help = Toggles the visibility of the status bar.
cmd.testdisplay.help = Displays a sample text. Used to preview styles.
cmd.topic.params = [<new-topic>]
cmd.topic.help = If <new-topic> is specified and you are a chanop, or the channel is not in 'private topic' mode (+t), the topic will be changed to <new-topic>. If <new-topic> is *not* specified, the current topic will be displayed.
cmd.tabstrip.help = Toggles the visibility of the channel tab strip.
cmd.unstalk.params = <text>
cmd.unstalk.help = Remove word from list of terms for which you would like to see alerts.
cmd.disable-plugin.params = <plugin>
cmd.disable-plugin.help = This command calls the plugin's disablePlugin function, if it exists. There are no guarantees that the plugin will properly disable itself.
cmd.usermode.params = [<new-mode>]
cmd.usermode.help = Changes or displays the current user mode.
cmd.user-charset.params = [<new-charset> [<user>]]
cmd.user-charset.help = Sets the character encoding mode to <new-charset>, or displays the current character encoding mode if <new-charset> is not provided. If <user> is not provided, the current user will be assumed.
cmd.user-motif.params = [<motif> [<user>]]
cmd.user-motif.help = Sets the CSS file used for the message tab for the user <user>. <motif> can be a URL to a .css file, or the shortcut "default", "light", or "dark". If <motif> is a minus ('-') character, the motif will revert to the network motif. If <user> is not provided, the current user is assumed. See the the ChatZilla homepage at <http://www.mozilla.org/projects/rt-messaging/chatzilla/> for more information on how to style ChatZilla. See also |motif|.
cmd.user-pref.params = [<pref-name> [<pref-value> [<delete-pref> [<user>]]]]
cmd.user-pref.help = Sets the value of the preference named <pref-name> to the value of <pref-value> on the user <user>. If <pref-value> is not provided, the current value of <pref-name> will be displayed. If both <pref-name> and <pref-value> are omitted, all preferences will be displayed. If <delete-pref> is provided and is |true|, |on|, |yes|, or |1|, or if <pref-name> starts with a minus ('-') character, then the preference will revert back to its default value. If <user> is not provided, the current user is assumed.
cmd.version.format = Get Version Information from $nickname
cmd.version.label = Get Version Information
cmd.version.params = <nickname>
cmd.version.help = Asks <nickname> what irc client they're running. Their IRC client may or may not show them that you've asked for this information. ChatZilla currently does not.
cmd.voice.format = Give Voice Status to $nickname
cmd.voice.label = Give Voice Status
cmd.voice.params = <nickname> [<...>]
cmd.voice.help = Gives voice status to <nickname> on current channel. Requires operator status.
cmd.who.params = <pattern>
cmd.who.help = List users who have name, host, or description information matching <pattern>.
cmd.whois.format = Whois $nickname
cmd.whois.label = Whois
cmd.whois.params = <nickname> [<...>]
cmd.whois.help = Displays information about the user <nickname>, including 'real name', server connected to, idle time, and signon time. Note that some servers will lie about the idle time.
cmd.whowas.params = <nick-pattern>
cmd.whowas.help = List brief information for users with a nickname matching <nick-pattern> who have recently logged on to the IRC network.
## dispatch-related error messages ##
msg.err.internal.dispatch = Internal error dispatching command ``%1$S''.
msg.err.internal.hook = Internal error processing hook ``%1$S''.
msg.err.no.command = No command named ``%1$S''.
msg.err.invalid.param = Invalid value for parameter %1$S (%2$S)
msg.err.disabled = Sorry, ``%1$S'' is currently disabled
msg.err.notimplemented = Sorry, ``%1$S'' has not been implemented
msg.err.required.param = Missing required parameter %1$S
msg.err.ambigcommand = Ambiguous command, ``%1$S'', %2$S commands match [%3$S]
## chatzilla error messages ##
msg.err.invalid.pref = Invalid value for preference %1$S (%2$S)
msg.err.failure = Operation Failed: %1$S
msg.err.scriptload = Error loading subscript from <%1$S>.
msg.err.invalid.scheme = Invalid scheme in url <%1$S>.
msg.err.unknown.pref = Unknown pref name ``%1$S''.
msg.err.unknown.network = Unknown network ``%S''
msg.err.unknown.channel = Unknown channel ``%S''
msg.err.unknown.user = Unknown user ``%S''
msg.err.unknown.stalk = Not stalking %S
msg.err.unknown.motif = Unknown motif ``%S''
msg.err.invalid.charset = Invalid character encoding mode ``%S''.
msg.err.improper.view = ``%S'' cannot be used from this view.
msg.err.not.connected = Not connected.
msg.err.last.view = Cannot delete last view.
msg.err.bad.ircurl = Invalid IRC URL ``%S''
msg.err.need.network = Command ``%1$S'' must be run in the context of a network
msg.err.need.server = Command ``%1$S'' must be run in the context of an attached server
msg.err.need.channel = Command ``%1$S'' must be run in the context of a channel
msg.err.need.user = Command ``%1$S'' must be run in the context of a user
msg.err.no.default = No default action for objects of type ``%S''
msg.err.no.match = No match for ``%S''
msg.err.no.socket = Error creating socket
msg.err.exhausted = Connection attempts exhausted, giving up.
msg.warn.unk.command = Unknown command ``%S'', just guessing.
msg.val.on = on
msg.val.off = off
## formatting ##
msg.fmt.usage = %1$S %2$S
msg.fmt.jsexception = %1$S: %2$S @ <%3$S> %4$S"
# 1: error number, 2: error text, 3: file name, 4: line number, 5: function name
# 1: pref name 2: value
msg.fmt.pref = Preference ``%1$S'' is ``%2$S''
msg.fmt.netpref = Network preference ``%1$S'' is ``%2$S''
msg.fmt.chanpref = Channel preference ``%1$S'' is ``%2$S''
msg.fmt.userpref = User preference ``%1$S'' is ``%2$S''
msg.fmt.plugin1 = Plugin at index %S, loaded from <%S>
msg.fmt.plugin2 = id: %S, version: %S, enabled: %S, status: %S
msg.fmt.plugin3 = Description: %S
msg.fmt.usercount = %S, %S@, %S+
msg.fmt.alias = %S = %S
msg.fmt.seconds = %S seconds
msg.fmt.matchlist = %S matches for ``%S'': [%S]
msg.fmt.ctcpreply = CTCP %S reply ``%S'' from %S
msg.fmt.chanlist = %S %S %S
# 1: month, 2: dom, 3: hours, 4: minutes, 5: nick info
msg.fmt.status = %S/%S %S:%S, %S
# 1: month, 2: dom, 3: hours, 4: minutes
msg.fmt.date = %S/%S %S:%S
msg.unknown = <unknown>
msg.none = <none>
msg.na = <n/a>
msg.commasp = ", "
msg.always = always
msg.and = and
msg.primary = primary
msg.secondary = secondary
msg.you = you
msg.network = Network
msg.channel = Channel
msg.user = User
msg.client = Client
msg.view = View
msg.tab = Tab
msg.loading = Loading
msg.error = Error
msg.here = here
msg.gone = gone
msg.connecting = Connecting
msg.connected = Connected
msg.disconnected = Disconnected
msg.days=%S days
msg.hours=%S hours
msg.minutes=%S minutes
msg.seconds=%S seconds
msg.rsp.hello = [HELLO]
msg.rsp.help = [HELP]
msg.rsp.usage = [USAGE]
msg.rsp.error = [ERROR]
msg.rsp.warn = [WARNING]
msg.rsp.info = [INFO]
msg.rsp.evin = [EVAL-IN]
msg.rsp.evout = [EVAL-OUT]
msg.mnu.showhide = Sho&w/Hide
msg.mnu.file = &File
msg.mnu.help = &Help
msg.mnu.view = &View
msg.mnu.motifs = Color Scheme
msg.mnu.opcommands = Operator Commands
msg.client.name = *client*
msg.cant.disable = Plugin %S does not support being disabled.
msg.cant.enable = Plugin %S does not support being enabled.
msg.no.help = Help not available.
msg.no.cmdmatch = No commands match ``%1$S''.
msg.cmdmatch = Commands matching ``%1$S'' are [%2$S].
msg.default.alias.help = This command is an alias for |%1$S|.
msg.extra.params = Extra parameters ``%1$S'' ignored.
msg.version.reply = Chatzilla %S [%S]
msg.nothing.to.cancel = No connection in progress, nothing to cancel.
msg.cancelling = Cancelling connection to ``%S''...
msg.current.charset = Using ``%S'' as default charset.
msg.current.charset.net = Using ``%S'' as default charset for this network.
msg.current.charset.chan = Using ``%S'' as charset for this channel.
msg.current.charset.user = Using ``%S'' as charset for this user.
msg.current.css = Using <%S> as default motif.
msg.current.css.net = Using <%S> as default motif for this network.
msg.current.css.chan = Using <%S> as motif for this channel.
msg.current.css.user = Using <%S> as motif for this user.
msg.subscript.loaded = Subscript <%1$S> loaded with result ``%2$S''.
msg.user.info = Default nickname, ``%S'', username ``%S'', and description ``%S''.
msg.connection.info = %S: User %S connected via %S:%S (%S server).
msg.server.info = %S: Connected for %S, last ping: %S, server roundtrip (lag): %S seconds.
msg.connect.via = Connected via %S
msg.user.mode = User mode for %S is now %S
msg.not.connected = %S: Not connected.
msg.member = Member
msg.operator = Operator member
msg.voiced = Voiced member
msg.voiceop = Operator and voiced member
msg.no.mode = no mode
msg.topic.info = %S, %S: Topic, ``%S''
msg.notopic.info = %S, %S: No topic.
msg.channel.info = %S: %S of %S (%S) <%S>
msg.channel.details = %S/%S: %S users total, %S operators, %S voiced.
msg.nonmember = %S: No longer a member of %S.
msg.end.status = End of status.
msg.networks.heada = Available networks are [
msg.networks.headb = ].
msg.messages.cleared = Messages Cleared.
cli_inamesMsg3=You must supply a channel name to use /names from this view.
cli_icommandsMsg=Type /help <command-name> for information about a specific command.
cli_icommandsMsg2=Currently implemented commands matching the pattern ``%S'' are [%S].\nType /help <command-name> for information about a specific command.
cli_icommandsMsg2b=Currently implemented commands are [%S].
cli_imeMsg=Me cannot be used in this view.
cli_imsgMsg=/query cannot be used from this view.
cli_imsgMsg2=Missing parameter.
cli_imsgMsg3=Query view for ``%S'' opened.
cli_imsgMsg4=You must be connected to a network to use msg
cli_iquoteMsg=You must be connected to a network to use quote.
cli_ictcpMsg=You must be connected to a server to use CTCP.
cli_ijoinMsg=No network selected.
cli_ijoinMsg2=Network ``%S'' is not connected.
cli_ijoinMsg3=Channel view for ``%S'' opened.
cli_ipartMsg=Leave can only be used from channels.
cli_izoomMsg=**WARNING** Zoom is busted at this time :(
cli_izoomMsg2=Zoom can only be used from channels.
cli_izoomMsg3=User ``%S'' not found.
cli_whoisMsg=You must be connected to a network to use whois
cli_itopicMsg=Topic can only be used from channels.
cli_itopicMsg2=Could not set topic.
aboutHomepage=Please visit the ChatZilla homepage at <http://www.mozilla.org/projects/rt-messaging/chatzilla/> for more information.
cli_iawayMsg=You must be connected to a network to use away.
cli_ideopMsg=You must be on a channel to use to use deop.
cli_ideopMsg2=User ``%S'' not found.
cli_iopMsg=You must be connected to a network to use op.
cli_iopMsg2=User ``%S'' not found.
cli_ivoiceMsg=You must be on a channel to use voice.
cli_ivoiceMsg2=User ``%S'' not found.
cli_devoiceMsg=You must be on a channel to use devoice.
cli_devoiceMsg2=User ``%S'' not found.
cli_iinviteMsg=You must be connected to a network to use invite.
cli_iinviteMsg2=You must be in a channel to use invite
cli_iinviteMsg3=You must be on %S to use invite.
cli_ikickMsg=You must be on a channel to use kick.
cli_ikickMsg2=User ``%S'' not found.
cli_iclientMsg=JavaScript console for ``*client*'' opened.
cli_inotifyMsg=/notify cannot be used from this view.
cli_inotifyMsg2=Your notify list is empty
cli_inotifyMsg3a=%S has been added to your notify list.
cli_inotifyMsg3b=%S have been added to your notify list.
cli_inotifyMsg4a=%S has been removed from your notify list.
cli_inotifyMsg4b=%S have been removed from your notify list.
cli_istalkMsg=No stalking victims.
cli_istalkMsg2=Currently stalking [%S]
cli_istalkMsg3=Now stalking %S
cli_iunstalkMsg=No longer stalking %S
cli_iunstalkMsg2=Not stalking %S
cli_irlistMsg=Error in pattern ``%S'': %S
cli_ilogMsg=Logging is off.
cli_ilogMsg2=Logging is on. Log output is going to file ``%S''.
cli_ilogMsg3=Logfile closed.
cli_ilogMsg4=Unknown view type, logging not turned on.
cli_ilogMsg5=Unable to open file ``%S''.
cli_ilogMsg6=Now logging to file ``%S''.
cli_ilogMsg7=Unable to write to file ``%S''. Logging disabled.
my_ctcprunk=CTCP %S reply ``%S'' from %S
my_whoisreplyMsg=%S <%S@%S> ``%S''
my_whoisreplyMsg2=%S: member of %S
my_whoisreplyMsg3=%S: attached to %S ``%S''
my_whoisreplyMsg4=%S: idle for %S (on since %S)
my_whoisreplyMsg5=End of WHOIS information for %S
my_341=You have invited %S to %S
my_Invite=%S (%S@%S) has invited you to %S
my_433Msg=The nickname ``%S'' is already in use, use the /nick command to pick a new one.
my_433Retry=The nickname ``%S'' is already in use, trying ``%S''.
my_321=List reply will appear on the ``%S'' view.
my_322=%S %S %S
my_323=Displayed %S of %S channels
my_315=End of WHO results for ``%S'', %S user(s) found
my_352.h=here
my_352.g=gone
my_352=User %S, (%S@%S) ``%S'' (%S), member of %S, is connected to <irc://%S/>, %S hop(s)
my_sconnect=Connecting to %S via %S:%S, attempt %S of %S...
my_neterrorNoSocket=Error creating socket
my_neterrorExhausted=Connection attempts exhausted, giving up.
my_netdisconnectConnectionRefused=Connection to %S (%S:%S) refused.
my_netdisconnectConnectionTimeout=Connection to %S (%S:%S) timed out.
my_netdisconnectUnknownHost=Unknown host %S.
my_netdisconnectConnectionClosed=Connection to %S (%S:%S) closed.
my_netdisconnectConnectionClosedStatus=Connection to %S (%S:%S) closed with status %S.
my_replyping=Ping reply from %S in %S
my_cnickMsg=YOU are now known as %S
my_cnickMsg2=%S is now known as %S
my_cprivmsgMsg=%S , your result is,
my_topicMsg=%S has changed the topic to ``%S''
my_topicMsg2=Topic for %S is ``%S''
my_topicMsg3=No topic for channel %S
my_topicinfoMsg=Topic for %S was set by %S on %S
my_cjoinMsg=YOU have joined %S
my_cjoinmsg2=%S (%S@%S) has joined %S
my_cpartMsg=YOU have left %S
my_cpartMsg2=%S has left %S
my_ckickMsg=YOU have been booted from %S by %S (%S)
my_ckickMsg2=%S was booted from %S by %S (%S)
my_cmodeMsg=Mode %S by %S
my_cquitMsg=YOU have left %S (%S)
my_cquitMsg2=%S has left %S (%S)
my_unkctcpMsg=Unknown CTCP %S (%S) from %S
msg.channel.opened = Channel view for ``%S'' opened.
msg.commands.header = Type /help <command-name> for information about a specific command.
msg.match.commands = Currently implemented commands matching the pattern ``%S'' are [%S].\nType /help <command-name> for information about a specific command.
msg.all.commands = Currently implemented commands are [%S].
msg.homepage = Please visit the ChatZilla homepage at <http://www.mozilla.org/projects/rt-messaging/chatzilla/> for more information.
msg.client.opened = JavaScript console for ``*client*'' opened.
msg.newnick.you = YOU are now known as %S
msg.newnick.notyou = %S is now known as %S
# munger.js
rule_mailto=Mailto
rule_link=URLs
rule_channel-link=IRC channel
rule_bugzilla-link=Bugzilla link
rule_face=Face
rule_ear=Ear
rule_quote=Double Quotes
rule_rheet=Rheet
rule_bold=Bold
rule_italic=Italic
rule_teletype=Teletype
rule_underline=Underline
rule_word-hyphenator=Word Hyphenator
rule_ctrl-char=Control Chars
msg.no.notify.list = Your notify list is empty
msg.notify.addone = %S has been added to your notify list.
msg.notify.addsome = %S have been added to your notify list.
msg.notify.delone = %S has been removed from your notify list.
msg.notify.delsome = %S have been removed from your notify list.
msg.not.an.alias = No such alias: %S
msg.alias.removed = Removed alias: %S
msg.alias.created = Created alias: %S = %S
msg.no.aliases = No aliases are defined
msg.no.stalk.list = No stalking victims.
msg.stalk.list = Currently stalking [%S]
msg.stalk.add = Now stalking %S
msg.stalk.del = No longer stalking %S
msg.title.net.on = User %S on ``%S'' (%S:%S)
msg.title.net.off = User %S, not connected to network ``%S''
msg.title.nonick = <unregistered-user>
msg.title.no.topic = No Topic
msg.title.no.mode = No Mode
msg.title.channel = %S on %S (%S): %S
msg.title.user = Conversation with %S %S
msg.title.unknown = ChatZilla!
msg.title.activity = %S -- Activity [%S]
msg.logging.off = Logging is off.
msg.logging.on = Logging is on. Log output is going to file ``%S''.
msg.logfile.closed = Logfile closed.
msg.logfile.error = Unable to open file ``%S'', logging disabled.
msg.logfile.opened = Now logging to <%S>.
msg.logfile.closing = Closing log file.
msg.logfile.write.error = Unable to write to file ``%S''. Logging disabled.
msg.query.opened = Query view for ``%S'' opened.
msg.network.opened = Network view for ``%S'' opened.
msg.already.connected = You are already connected to ``%S''.
msg.enter.nick = Please select a nickname
msg.network.connecting = Attempting to connect to ``%S''. Use /cancel to abort.
msg.url.password = Enter a password for the url %S
msg.url.key = Enter key for url %S
msg.startup.added = <%1$S> will now open at startup.
msg.startup.removed = <%1$S> will no longer open at startup.
msg.startup.exists = <%1$S> is currently opened at startup.
msg.startup.notfound = <%1$S> is not currently opened at startup.
msg.test.hello = Sample HELLO message, <http://testurl.com/foo.html>.
msg.test.info = Sample INFO message, <http://testurl.com/foo.html>.
msg.test.error = Sample ERROR message, <http://testurl.com/foo.html>.
msg.test.help = Sample HELP message, <http://testurl.com/foo.html>.
msg.test.usage = Sample USAGE message, <http://testurl.com/foo.html>.
msg.test.status = Sample STATUS message, <http://testurl.com/foo.html>.
msg.test.privmsg = Normal message from %S to %S, <http://testurl.com/foo.html>.
msg.test.action = Action message from %S to %S, <http://testurl.com/foo.html>.
msg.test.notice = Notice message from %S to %S, <http://testurl.com/foo.html>.
msg.test.url = Sample URL <http://www.mozilla.org> message.
msg.test.styles = Sample text styles *bold*, _underline_, /italic/, |teletype| message.
msg.test.emoticon = Sample emoticon :) :( :~( :0 :/ :P :| (* message.
msg.test.rheet = Sample Rheeeeeeeeeet! message.
msg.test.topic = Sample Topic message, <http://testurl.com/foo.html>.
msg.test.join = Sample Join message, <http://testurl.com/foo.html>.
msg.test.part = Sample Part message, <http://testurl.com/foo.html>.
msg.test.kick = Sample Kick message, <http://testurl.com/foo.html>.
msg.test.quit = Sample Quit message, <http://testurl.com/foo.html>.
msg.test.stalk = %S : Sample /stalk match, <http://testurl.com/foo.html>.
msg.test.ctlchr = Sample control char >%01<\\1 -- >%05<\\5 -- >%10<\\10
msg.test.color = Sample color %033c%034o%034l%033o%033r%034%20%036t%036e%032s%034t%0f message.
msg.test.quote = Sample ``double quote'' message.
msg.welcome = Welcome to ChatZilla...\nUse /attach <network-name> to connect to a network, or click on one of the network names below.\nFor general IRC help and FAQs, please go to <http://www.irchelp.org>, for information about ChatZilla go to <http://www.mozilla.org/projects/rt-messaging/chatzilla/>.
msg.tabdnd.drop = Would you like to use the file ``%S'' as your new motif?
msg.default.status = Welcome to ChatZilla!
msg.closing = Disconnecting from IRC. Click close again to exit now.
msg.whois.name = %S <%S@%S> ``%S''
msg.whois.channels = %S: member of %S
msg.whois.server = %S: attached to %S ``%S''
msg.whois.idle = %S: idle for %S (on since %S)
msg.whois.end = End of WHOIS information for %S
msg.you.invite = You have invited %S to %S
msg.invite.you = %S (%S@%S) has invited you to %S
msg.nick.in.use = The nickname ``%S'' is already in use, use the /nick command to pick a new one.
msg.retry.nick = The nickname ``%S'' is already in use, trying ``%S''.
msg.list.rerouted = List reply will appear on the ``%S'' view.
msg.list.end = Displayed %S of %S channels
msg.who.end = End of WHO results for ``%S'', %S user(s) found
msg.who.match = User %S, (%S@%S) ``%S'' (%S), member of %S, is connected to <irc://%S/>, %S hop(s)
msg.connection.attempt = Connecting to %S via %S:%S, attempt %S of %S...
msg.connection.refused = Connection to %S (%S:%S) refused.
msg.connection.timeout = Connection to %S (%S:%S) timed out.
msg.unknown.host = Unknown host %S.
msg.connection.closed = Connection to %S (%S:%S) closed.
msg.close.status = Connection to %S (%S:%S) closed with status %S.
msg.ping.reply = Ping reply from %S in %S
msg.prefix.response = %S , your result is,
msg.topic.changed = %S has changed the topic to ``%S''
msg.topic = Topic for %S is ``%S''
msg.no.topic = No topic for channel %S
msg.topic.date = Topic for %S was set by %S on %S
msg.you.joined = YOU have joined %S
msg.someone.joined = %S (%S@%S) has joined %S
msg.you.left = YOU have left %S
msg.someone.left = %S has left %S
msg.youre.gone = YOU have been booted from %S by %S (%S)
msg.someone.gone = %S was booted from %S by %S (%S)
msg.mode.changed = Mode %S by %S
msg.you.quit = YOU have left %S (%S)
msg.someone.quit = %S has left %S (%S)
msg.unknown.ctcp = Unknown CTCP %S (%S) from %S
# pref-irc-appearance.js
file_browse_CSS=Choose a Cascading Stylesheet (CSS) file
@ -456,9 +634,16 @@ stalk_add_msg=Enter the stalk word to add:
file_browse_Script=Choose a JavaScript Script file
file_browse_Script_spec=JavaScript Script files (*.js)
#utils.js
days=%S days
hours=%S hours
minutes=%S minutes
seconds=%S seconds
munger.mailto=Mailto
munger.link=URLs
munger.channel-link=IRC channel
munger.bugzilla-link=Bugzilla link
munger.face=Face
munger.ear=Ear
munger.quote=Double Quotes
munger.rheet=Rheet
munger.bold=Bold
munger.italic=Italic
munger.teletype=Teletype
munger.underline=Underline
munger.ctrl-char=Control Chars

Просмотреть файл

@ -103,6 +103,10 @@ window {
padding-right: 10px;
}
#user-list {
margin: 0px;
}
#server-nick {
padding-top: 5px;
}
@ -130,20 +134,38 @@ window {
border: thin silver inset;
}
/* op image column */
treechildren::-moz-tree-image(usercol-op, state-true) {
list-style-image: url(chrome://chatzilla/skin/images/is-op.gif)
treecol {
border: none;
}
treechildren::-moz-tree-image(usercol-op, state-false) {
list-style-image: url(chrome://chatzilla/skin/images/isnt-op.gif)
/* we need to define both the : and :: versions of the treechildren selector
* so that we work on both 1.5 and pre 1.5 builds.
*/
/* voice image column */
treechildren:-moz-tree-image {
list-style-image: url(chrome://chatzilla/skin/images/is-nada.png);
}
treechildren::-moz-tree-image {
list-style-image: url(chrome://chatzilla/skin/images/is-nada.png);
}
/* voice image column */
treechildren::-moz-tree-image(usercol-voice, state-true) {
list-style-image: url(chrome://chatzilla/skin/images/is-voice.gif)
treechildren:-moz-tree-image(voice-true) {
list-style-image: url(chrome://chatzilla/skin/images/is-voice.png);
}
treechildren::-moz-tree-image(usercol-voice, state-false) {
list-style-image: url(chrome://chatzilla/skin/images/isnt-voice.gif)
treechildren::-moz-tree-image(voice-true) {
list-style-image: url(chrome://chatzilla/skin/images/is-voice.png);
}
/* op image column */
treechildren:-moz-tree-image(op-true) {
list-style-image: url(chrome://chatzilla/skin/images/is-op.png);
}
treechildren::-moz-tree-image(op-true) {
list-style-image: url(chrome://chatzilla/skin/images/is-op.png);
}

Двоичные данные
extensions/irc/xul/skin/images/is-nada.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 255 B

Двоичные данные
extensions/irc/xul/skin/images/is-op.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 355 B

Двоичные данные
extensions/irc/xul/skin/images/is-voice.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 300 B

Просмотреть файл

@ -43,6 +43,43 @@ a.chatzilla-link:visited {
color: lightgrey;
}
.header {
color: lightslategrey;
background-color: #333333;
/* -moz-opacity: 0.9; */ causes memory leak?
border: 1px white solid;
-moz-border-radius: 7px;
}
.value {
color: silver;
}
#splash {
color: #444444;
}
#usr-descnodes,
#ch-topicnodes {
color: white;
}
[condition] {
font-weight: bold;
}
[condition="red"] {
color: red;
}
[condition="yellow"] {
color: yellow;
}
[condition="green"] {
color: lightgreen;
}
.msg-data[msg-type="JOIN"] a.chatzilla-link,
.msg-data[msg-type="PART"] a.chatzilla-link {
color: lightcyan;

Просмотреть файл

@ -36,11 +36,60 @@ body.chatzilla-body { /* The topmost container in the ChatZilla */
}
a.chatzilla-link {
color: #777499 /*#ea3838*/;
font-weight: bold;
color: #342ecc;
}
.msg-data[msg-type="QUIT"] a.chatzilla-link {
color: #d1ecf9;
.header-outer {
background-color: #d1d0ea;
}
.header {
color: darkslategrey;
background-color: #EEEEEE;
/* -moz-opacity: 0.9;*/
border: 1px #777499 solid;
-moz-border-radius: 7px;
}
#splash {
color: #DDDDDD;
}
#usr-descnodes,
#ch-topicnodes {
color: black;
}
[condition] {
font-weight: bold;
}
[condition="red"] {
color: red;
}
[condition="yellow"] {
color: orange;
}
[condition="green"] {
color: #2ec908;
}
.msg-data[msg-type="PRIVMSG"],
.msg-data[msg-type="ACTION"] {
background-color: #F0F0F0;
}
.msg-data[msg-type="HELLO"] a.chatzilla-link {
color: #d7d9dd;
}
.msg-data[msg-type="JOIN"] a.chatzilla-link,
.msg-data[msg-type="PART"] a.chatzilla-link {
font-weight: bold;
color: #11c411;
}
.msg-data[msg-type="ERROR"] a.chatzilla-link {
@ -48,12 +97,16 @@ a.chatzilla-link {
color: white;
}
.msg-data[msg-type="QUIT"] a.chatzilla-link:visited {
color: #b4ccd8;
.msg-data[msg-type="KICK"] a.chatzilla-link {
color: #aa0d08;
}
.msg-data[msg-type="KICK"] a.chatzilla-link {
color: lightgrey;
.msg-data[msg-type="NOTICE"] a.chatzilla-link {
color: #d64444;
}
.msg-data[msg-type="QUIT"] a.chatzilla-link {
color: #c46907;
}
.chatzilla-rheet {
@ -76,7 +129,8 @@ a.chatzilla-link {
}
.msg-type { /* .msg-type = message type */
color: #202020; /* indicator */
color: #686699; /* indicator */
font-weight: bold;
}
.msg-user a.chatzilla-link,
@ -89,33 +143,24 @@ a.chatzilla-link {
color: #555555; /* subtle brightness change when */
} /* the speaker changes. */
.msg-type[msg-type="KICK"],
.msg-type[msg-type="NICK"],
.msg-type[msg-type="QUIT"],
.msg-type[msg-type="JOIN"],
.msg-type[msg-type="PART"] {
visibility: hidden;
}
.msg-data[msg-type="JOIN"],
.msg-data[msg-type="PART"] {
background: #b4ccd8;
color: black;
color: #0e9e0e;
background-color: #c3f7c3;
font-weight: bold;
-moz-border-radius: 5px 5px 5px 5px;
/*border: thin darkblue solid;*/
}
.msg-data[msg-type="QUIT"] {
background: #777499;
color: white;
background: #fff196;
color: #ff8d02;
font-weight: bold;
-moz-border-radius: 5px 5px 5px 5px;
}
.msg-data[msg-type="HELLO"] {
background: #ffd000;
background: #1342a5;
color: white;
-moz-border-radius: 5px 5px 5px 5px;
font-weight: bold;
@ -123,7 +168,7 @@ a.chatzilla-link {
.msg-data[msg-type="ERROR"] {
-moz-border-radius: 5px 5px 5px 5px;
background: #ff2600;
background: #a8221e;
color: white;
}
@ -137,22 +182,25 @@ a.chatzilla-link {
}
.msg-data[msg-type="NICK"] {
color: #669da3;
color: #4e8387;
background-color: #d5e9ea;
font-weight: bold;
}
.msg-data[msg-type="NOTICE"] {
color: #ff6500;
color: #ae4141;
font-weight: bold;
}
.msg-data[msg-type="MODE"] {
color: purple;
color: #2709ed;
font-weight: bold;
}
.msg-data[msg-type="KICK"] {
color: white;
background: #ff6500;
color: #ff1a0a;
background: #ffdbcc;
font-weight: bold;
-moz-border-radius: 5px 5px 5px 5px;
}
@ -160,19 +208,12 @@ a.chatzilla-link {
* it, has your nickname in it, or was spoken by someone in your /stalk list.
*/
.msg-user[important="true"] {
background: #d4d8d4;
-moz-border-radius: 5px 0px 0px 5px;
border-bottom: 1px black solid;
border-top: 1px lightslategrey solid;
border-left: 1px lightslategrey solid;
background: #d7ceea;
}
.msg-data[important="true"] {
-moz-border-radius: 0px 5px 5px 0px;
border-bottom: 1px black solid;
border-right: 1px black solid;
border-top: 1px lightslategrey solid;
background: #d7ceea;
background: #eaefeb;
}