- chatzilla only -

bug 143503, "long channel topic isn't wrapped properly"
r=samuel@sieb.net, sr=shaver@mozilla.org, a=leaf@mozilla.org
insert spaces in long topic words so things can wrap.

bug 140088, "Chatzilla is crashing when switching tabs."
r=samuel@sieb.net, sr=shaver, a=rjesup@wgate.com
don't touch the tree selection while the tree is hidden.


git-svn-id: svn://10.0.0.236/trunk@121611 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rginda%netscape.com 2002-05-16 10:49:25 +00:00
parent b2403a4a88
commit b0faa02072
2 changed files with 33 additions and 10 deletions

View File

@ -467,6 +467,15 @@ function onToggleVisibility(thing)
if (d == "true")
{
if (thing == "info")
{
if (client.currentObject.TYPE == "IRCChannel")
client.rdf.setTreeRoot ("user-list",
client.currentObject.getGraphResource());
else
client.rdf.setTreeRoot ("user-list", client.rdf.resNullChan);
}
newState = "false";
menu.setAttribute ("checked", "true");
client.uiState[thing] = true;

View File

@ -36,7 +36,7 @@ const MSG_UNKNOWN = getMsg ("unknown");
client.defaultNick = getMsg( "defaultNick" );
client.version = "0.8.6";
client.version = "0.8.7";
client.TYPE = "IRCClient";
client.COMMAND_CHAR = "/";
@ -1449,6 +1449,17 @@ function updateChannel (obj)
client.statusBar["channel-mode"].setAttribute("value", mode);
client.statusBar["channel-users"].setAttribute("value", users);
var regex = new RegExp ("(\\S{" + client.MAX_WORD_DISPLAY + ",})", "g");
var ary = topic.match(regex);
if (ary && ary.length)
{
for (var i = 0; i < ary.length; ++i)
{
var hyphenated = hyphenateWord(ary[i], client.MAX_WORD_DISPLAY);
topic = topic.replace(ary[i], hyphenated);
}
}
client.statusBar["channel-topic"].firstChild.data = topic;
}
@ -1663,16 +1674,19 @@ function setCurrentObject (obj)
/* Unselect currently selected users. */
userList = document.getElementById("user-list");
/* Remove curently selection items before this tree gets rerooted,
* because it seems to remember the selections for eternity if not. */
if (userList.treeBoxObject.selection)
userList.treeBoxObject.selection.clearSelection ();
if (obj.TYPE == "IRCChannel")
client.rdf.setTreeRoot ("user-list", obj.getGraphResource());
else
client.rdf.setTreeRoot ("user-list", client.rdf.resNullChan);
if (isVisible("user-list-box"))
{
/* Remove currently selected items before this tree gets rerooted,
* because it seems to remember the selections for eternity if not. */
if (userList.treeBoxObject.selection)
userList.treeBoxObject.selection.clearSelection ();
if (obj.TYPE == "IRCChannel")
client.rdf.setTreeRoot ("user-list", obj.getGraphResource());
else
client.rdf.setTreeRoot ("user-list", client.rdf.resNullChan);
}
client.currentObject = obj;
tb = getTabForObject(obj);
if (tb)