зеркало из https://github.com/mozilla/pjs.git
chatzilla only, a=asa, bug=41564
fix remaining charset bugs and add /charset command update changelog change version to 0.8.5
This commit is contained in:
Родитель
a25f717333
Коммит
f1a23efa72
|
@ -1,14 +1,17 @@
|
|||
#################################################################################
|
||||
# 12/03/01, ChatZilla 0.8.5-rc1, <rginda@netscape.com>
|
||||
|
||||
Currently in the release candidate stage, this should be 0.8.5 final by mozilla
|
||||
0.9.7. Again, thanks to Samuel Sieb <samuel@sieb.net> for contributing
|
||||
many of the fixes (most obvious of which is mIRC color code support), reviews,
|
||||
and driving the release candidate process. Thanks to Casey Hutchinson
|
||||
<nnooiissee@yahoo.com> for mac accelerator cleanup, help and edit menus, xul
|
||||
refactoring work, statusbar, and motivation.
|
||||
Shipped with 0.9.7. Again, thanks to Samuel Sieb <samuel@sieb.net> for
|
||||
contributing many of the fixes (the most obvious of which is mIRC color code
|
||||
support), reviews, and driving the release candidate process. Thanks to Casey
|
||||
Hutchinson <nnooiissee@yahoo.com> for mac accelerator cleanup, help and edit
|
||||
menus, xul refactoring work, statusbar, and motivation. Thanks to
|
||||
KOIKE Kazuhiko, Katsuhiko Momoi, Shoji Matsumoto, and others who helped out in
|
||||
bug 41564 to get charsets working.
|
||||
|
||||
* strict warning cleanup.
|
||||
* add input/output charset support. use /eval setCharset("charsetname"); to
|
||||
change the current charset, settings will be saved.
|
||||
* add "open at startup" item to view menus.
|
||||
* implement urls for /query views (isnick urls.)
|
||||
* make nicknames in output window isnick urls.
|
||||
|
@ -16,16 +19,16 @@ refactoring work, statusbar, and motivation.
|
|||
* add chatzilla icon to mozilla statusbar.
|
||||
* move "statusbar" to top of message window, rename to "header".
|
||||
* add mirc color code handling.
|
||||
* show long topics in multiple lines is header, instead of cropping.
|
||||
* show long topics in multiple lines in header, instead of cropping.
|
||||
* add bugzilla munger rule, links "bug 12345" and "bug #12345" to appropriate
|
||||
bugzilla bugs.
|
||||
* add channel munger rule to link #channelname to the channel.
|
||||
* add edit and help menus.
|
||||
* make /attach accept urls and url "fragments",
|
||||
/attach moznet, /attach moznet/chatzilla, and /attach irc://moznet/chatzilla
|
||||
are all valid commands.
|
||||
* add prefs for when to beep, new msg, msg in existing query view, and stalk
|
||||
matches.
|
||||
are now all valid commands.
|
||||
* add prefs for when to make noise; new msg, msg in existing query view, and/or
|
||||
/stalk matches.
|
||||
* allow for space seperated list of sounds to play, like "beep beep", or
|
||||
"file:/foo.wav"
|
||||
* fix bogus "connection refused" error when disconnecting.
|
||||
|
@ -49,7 +52,6 @@ refactoring work, statusbar, and motivation.
|
|||
* remove unused listbox.js file from chatzilla.jar.
|
||||
* add help menu.
|
||||
* allow params in /ctcp commands.
|
||||
* UNTESTED - add input/output charset support.
|
||||
|
||||
|
||||
=================================================================================
|
||||
|
|
|
@ -39,6 +39,7 @@ function addCommands(commandObject)
|
|||
add ("attach", "onInputAttach");
|
||||
add ("away", "onInputAway");
|
||||
add ("cancel", "onInputCancel");
|
||||
add ("charset", "onInputCharset");
|
||||
add ("clear", "onInputClear");
|
||||
add ("client", "onInputClient");
|
||||
add ("commands", "onInputCommands");
|
||||
|
|
|
@ -734,10 +734,17 @@ function onInputKeyPress (e)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (client.lastHistoryReferenced <
|
||||
client.inputHistory.length - 1)
|
||||
if (client.lastHistoryReferenced == -2)
|
||||
{
|
||||
client.lastHistoryReferenced = -1;
|
||||
e.target.value = client.incompleteLine;
|
||||
}
|
||||
else if (client.lastHistoryReferenced <
|
||||
client.inputHistory.length - 1)
|
||||
{
|
||||
e.target.value =
|
||||
client.inputHistory[++client.lastHistoryReferenced];
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -745,21 +752,22 @@ function onInputKeyPress (e)
|
|||
if (client.lastHistoryReferenced > 0)
|
||||
e.target.value =
|
||||
client.inputHistory[--client.lastHistoryReferenced];
|
||||
else if (client.lastHistoryReferenced == -1)
|
||||
{
|
||||
e.target.value = "";
|
||||
client.lastHistoryReferenced = -2;
|
||||
}
|
||||
else
|
||||
{
|
||||
client.lastHistoryReferenced = -1;
|
||||
e.target.value = client.incompleteLine;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
// case 9: /* tab */
|
||||
//e.preventDefault();
|
||||
//break;
|
||||
|
||||
|
||||
default:
|
||||
client.lastHistoryReferenced = -1;
|
||||
client.incompleteLine = e.target.value;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1002,6 +1010,25 @@ function cli_icancel (e)
|
|||
return true;
|
||||
}
|
||||
|
||||
client.onInputCharset =
|
||||
function cli_icharset (e)
|
||||
{
|
||||
if (e.inputData)
|
||||
{
|
||||
if (!setCharset(e.inputData))
|
||||
{
|
||||
client.currentObject.display (getMsg("cli_charsetError",
|
||||
e.inputData),
|
||||
"ERROR");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
client.currentObject.display (getMsg("cli_currentCharset", client.CHARSET),
|
||||
"INFO");
|
||||
return true;
|
||||
}
|
||||
|
||||
client.onInputCommand =
|
||||
function cli_icommand (e)
|
||||
{
|
||||
|
|
|
@ -36,7 +36,7 @@ const MSG_UNKNOWN = getMsg ("unknown");
|
|||
|
||||
client.defaultNick = getMsg( "defaultNick" );
|
||||
|
||||
client.version = "0.8.5-rc5";
|
||||
client.version = "0.8.5";
|
||||
|
||||
client.TYPE = "IRCClient";
|
||||
client.COMMAND_CHAR = "/";
|
||||
|
@ -138,16 +138,9 @@ function toUnicode (msg)
|
|||
if (!("ucConverter" in client))
|
||||
return msg;
|
||||
|
||||
/* if we're in a stateful charset, return to ascii mode before starting */
|
||||
if (client.CHARSET.search(/iso-2022/i) != -1)
|
||||
client.ucConverter.ConvertToUnicode("\x1B(B");
|
||||
|
||||
msg = client.ucConverter.ConvertToUnicode(msg);
|
||||
|
||||
/* if we're in a stateful charset, return to ascii mode at the end */
|
||||
if (client.CHARSET.search(/iso-2022/i) != -1)
|
||||
client.ucConverter.ConvertToUnicode("\x1B(B");
|
||||
return msg
|
||||
/* XXX set charset again to force the encoder to reset, see bug 114923 */
|
||||
client.ucConverter.charset = client.CHARSET;
|
||||
return client.ucConverter.ConvertToUnicode(msg);
|
||||
}
|
||||
|
||||
function fromUnicode (msg)
|
||||
|
@ -155,6 +148,8 @@ function fromUnicode (msg)
|
|||
if (!("ucConverter" in client))
|
||||
return msg;
|
||||
|
||||
/* XXX set charset again to force the encoder to reset, see bug 114923 */
|
||||
client.ucConverter.charset = client.CHARSET;
|
||||
return client.ucConverter.ConvertFromUnicode(msg);
|
||||
}
|
||||
|
||||
|
@ -194,6 +189,7 @@ function setCharset (charset)
|
|||
catch (ex)
|
||||
{
|
||||
dd ("Caught exception setting charset to " + charset + "\n" + ex);
|
||||
delete client.ucConverter;
|
||||
client.CHARSET = "";
|
||||
client.eventPump.removeHookByName("uc-hook");
|
||||
return false;
|
||||
|
@ -273,10 +269,9 @@ function initStatic()
|
|||
client.onInputNetworks();
|
||||
client.onInputCommands();
|
||||
|
||||
ary = client.INITIAL_VICTIMS.split(";");
|
||||
ary = client.INITIAL_VICTIMS.split(/\s*;\s*/);
|
||||
for (i in ary)
|
||||
{
|
||||
ary[i] = stringTrim(ary[i]);
|
||||
if (ary[i])
|
||||
client.stalkingVictims.push (ary[i]);
|
||||
}
|
||||
|
@ -302,13 +297,11 @@ function initStatic()
|
|||
if (!wentSomewhere)
|
||||
{
|
||||
/* if we had nowhere else to go, connect to any default urls */
|
||||
ary = client.INITIAL_URLS.split(";");
|
||||
ary = client.INITIAL_URLS.split(/\s*;\s*/).reverse();
|
||||
for (var i in ary)
|
||||
{
|
||||
if ((ary[i] = stringTrim(ary[i])) && ary[i] != "irc://")
|
||||
{
|
||||
if (ary[i] && ary[i] != "irc://")
|
||||
gotoIRCURL (ary[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -39,6 +39,9 @@ awayHelp=If <reason> is specified, sets you away with that message. Used without
|
|||
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.
|
||||
|
||||
charsetUsage=[<charset>]
|
||||
charsetHelp=Sets the character encoding mode to <charset>, or displays the current character encoding mode if <charset> is not provided.
|
||||
|
||||
clearUsage=
|
||||
clearHelp=Clear the current view, discarding *all* content.
|
||||
|
||||
|
@ -244,6 +247,8 @@ 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.
|
||||
|
|
Загрузка…
Ссылка в новой задаче