Index: xul/content/config.js =================================================================== RCS file: /cvsroot/mozilla/extensions/irc/xul/content/config.js,v retrieving revision 1.15 retrieving revision 1.16 diff -d -p -u -6 -r1.15 -r1.16 --- xul/content/config.js 3 May 2008 15:41:25 -0000 1.15 +++ xul/content/config.js 3 May 2008 16:01:08 -0000 1.16 @@ -1051,60 +1051,67 @@ function pwin_onLoad() var currentView = null; // Enumerate source window's tab list... if (("arguments" in window) && (0 in window.arguments) && ("client" in window.arguments[0])) { /* Make sure we survive this, external data could be bad. :) */ - try { + try + { var czWin = window.arguments[0]; var s; var n, c, u; this.ownerClient = czWin.client; this.ownerClient.configWindow = window; - + /* Go nick the source window's view list. We can then show items in * the tree for the currently connected/shown networks, channels * and users even if they don't have any known prefs yet. * * NOTE: the |false, true| params tell the objects to not force * any prefs into existance, but still show in the tree. */ for (i = 0; i < czWin.client.viewsArray.length; i++) { var view = czWin.client.viewsArray[i].source; - + // Network view... if (view.TYPE == "IRCNetwork") { n = new PrefNetwork(client, view.unicodeName, false, true); if (view == czWin.client.currentObject) currentView = n; } - + if (view.TYPE.match(/^IRC(Channel|User)$/)) - s = client.networks[view.parent.parent.canonicalName].primServ; - + { + n = new PrefNetwork(client, view.parent.parent.unicodeName, + false, true); + s = n.primServ; + } + // Channel view... if (view.TYPE == "IRCChannel") { c = new PrefChannel(s, view.unicodeName, false, true); if (view == czWin.client.currentObject) currentView = c; } - + // User view... if (view.TYPE == "IRCUser") { - u = new PrefUser(s, view.nick, false, true); + u = new PrefUser(s, view.unicodeName, false, true); if (view == czWin.client.currentObject) currentView = u; } } - } catch(ex) {} + } + catch(ex) + {} } - + // Add the client object... this.prefObjects.addObject(client); // ...and everyone else. var i, j; /* We sort the keys (property names, i.e. network names). This means the UI * will show them in lexographical order, which is good.