|
@@ -0,0 +1,136 @@
|
|
|
+# HG changeset patch
|
|
|
+# User Ian Neal <iann_cvs@blueyonder.co.uk>
|
|
|
+# Date 1727120087 -3600
|
|
|
+# Parent 999b10945bf4537af7b2731834d3a8e853ae6e3f
|
|
|
+Bug 1920565 - Tidy up channels code in cZ. r=frg a=frg
|
|
|
+
|
|
|
+diff --git a/suite/extensions/irc/locales/en-US/chrome/chatzilla.properties b/suite/extensions/irc/locales/en-US/chrome/chatzilla.properties
|
|
|
+--- a/suite/extensions/irc/locales/en-US/chrome/chatzilla.properties
|
|
|
++++ b/suite/extensions/irc/locales/en-US/chrome/chatzilla.properties
|
|
|
+@@ -1248,17 +1248,16 @@ msg.conf.mode.off = Conference Mode h
|
|
|
+
|
|
|
+ # Join Network/Channel dialog
|
|
|
+ msg.cd.updated = Network's channel list cached on %S"
|
|
|
+ msg.cd.updated.format = %e %B %Y
|
|
|
+ msg.cd.updated.never = Network's channel list not cached
|
|
|
+ msg.cd.create = <create new channel>
|
|
|
+ msg.cd.filtering = Filtered %S of %S channels…
|
|
|
+ msg.cd.showing = Showing %S of %S channels.
|
|
|
+-msg.cd.wait.list = Waiting for current list operation to finish…
|
|
|
+ msg.cd.fetching = Fetching channel list…
|
|
|
+ msg.cd.fetched = Fetched %S channels…
|
|
|
+ msg.cd.error.list = There was an error loading the channel list.
|
|
|
+ msg.cd.loaded = Loaded %S channels…
|
|
|
+
|
|
|
+
|
|
|
+ msg.urls.none = There are no stored URLs.
|
|
|
+ msg.urls.header = Listing the %S most recent stored URLs (most recent first):
|
|
|
+diff --git a/suite/extensions/irc/xul/content/channels.js b/suite/extensions/irc/xul/content/channels.js
|
|
|
+--- a/suite/extensions/irc/xul/content/channels.js
|
|
|
++++ b/suite/extensions/irc/xul/content/channels.js
|
|
|
+@@ -74,57 +74,43 @@ function onLoad()
|
|
|
+
|
|
|
+ client = window.arguments[0].client;
|
|
|
+ client.joinDialog = window;
|
|
|
+
|
|
|
+ window.dd = client.mainWindow.dd;
|
|
|
+ window.ASSERT = client.mainWindow.ASSERT;
|
|
|
+ window.toUnicode = client.mainWindow.toUnicode;
|
|
|
+ window.getMsg = client.mainWindow.getMsg;
|
|
|
+- window.MSG_CHANNEL_OPENED = client.mainWindow.MSG_CHANNEL_OPENED;
|
|
|
+ window.MSG_FMT_JSEXCEPTION = client.mainWindow.MSG_FMT_JSEXCEPTION;
|
|
|
+ window.MT_INFO = client.mainWindow.MT_INFO;
|
|
|
+
|
|
|
+ // Import "MSG_CD_*"...
|
|
|
+ for (var m in client.mainWindow)
|
|
|
+ {
|
|
|
+ if (m.substr(0, 7) == "MSG_CD_")
|
|
|
+ window[m] = client.mainWindow[m];
|
|
|
+ }
|
|
|
+
|
|
|
+ // Cache all the XUL DOM elements.
|
|
|
+ var elements = ["network", "networks", "channel", "includeTopic",
|
|
|
+ "lastUpdated", "join", "minUsers", "maxUsers", "refresh",
|
|
|
+- "bottomPanel", "channels", "loadContainer", "loadLabel",
|
|
|
+- "loadBarDeck", "loadBar"];
|
|
|
++ "bottomPanel", "channels", "loadLabel", "loadBarDeck",
|
|
|
++ "loadBar"];
|
|
|
+ for (var i = 0; i < elements.length; i++)
|
|
|
+ xul[elements[i]] = document.getElementById(elements[i]);
|
|
|
+
|
|
|
+- // Set the <dialog>'s class so we can do platform-specific CSS.
|
|
|
+- var dialog = document.getElementById("chatzilla-window");
|
|
|
+- dialog.className = "platform-" + client.platform;
|
|
|
++ // Set attribute on documentElement so we can do platform-specific CSS.
|
|
|
++ document.documentElement.setAttribute("platform", client.platform);
|
|
|
+
|
|
|
+ // Set up the channel tree view.
|
|
|
+ tree.view = new XULTreeView(tree.share);
|
|
|
+ tree.view.onRowCommand = doJoin;
|
|
|
+ tree.view.cycleHeader = changeSort;
|
|
|
+ xul.channels.treeBoxObject.view = tree.view;
|
|
|
+
|
|
|
+- // If the new "search" binding is not working (i.e. doesn't exist)...
|
|
|
+- if (!("searchButton" in xul.channel))
|
|
|
+- {
|
|
|
+- // ...restore the text boxes to their former selves.
|
|
|
+- xul.channel.setAttribute("timeout", "500");
|
|
|
+- xul.channel.setAttribute("type", "timed");
|
|
|
+- xul.minUsers.setAttribute("timeout", "500");
|
|
|
+- xul.minUsers.setAttribute("type", "timed");
|
|
|
+- xul.maxUsers.setAttribute("timeout", "500");
|
|
|
+- xul.maxUsers.setAttribute("type", "timed");
|
|
|
+- }
|
|
|
+-
|
|
|
+ // Sort by user count, descending.
|
|
|
+ changeSort("chanColUsers");
|
|
|
+
|
|
|
+ xul.channels.addEventListener("dblclick", ondblclick, false);
|
|
|
+ xul.channels.addEventListener("keypress", onkeypress, false);
|
|
|
+ xul.channels.addEventListener("focus", onfocus, false);
|
|
|
+ xul.channels.addEventListener("blur", onblur, false);
|
|
|
+
|
|
|
+diff --git a/suite/extensions/irc/xul/content/channels.xul b/suite/extensions/irc/xul/content/channels.xul
|
|
|
+--- a/suite/extensions/irc/xul/content/channels.xul
|
|
|
++++ b/suite/extensions/irc/xul/content/channels.xul
|
|
|
+@@ -74,17 +74,17 @@
|
|
|
+ tabindex="7"
|
|
|
+ label="&refreshNow.label;"
|
|
|
+ accesskey="&refreshNow.accesskey;"
|
|
|
+ oncommand="refreshList(); focusSearch();"/>
|
|
|
+ </row>
|
|
|
+ </rows>
|
|
|
+ </grid>
|
|
|
+ </hbox>
|
|
|
+- <deck id="bottomPanel" flex="1" selectedindex="0">
|
|
|
++ <deck id="bottomPanel" flex="1" selectedIndex="0">
|
|
|
+ <hbox pack="center" align="center">
|
|
|
+ <label value="&network.hint.label;"/>
|
|
|
+ </hbox>
|
|
|
+ <vbox>
|
|
|
+ <tree id="channels" flex="1" hidecolumnpicker="true" seltype="single" tabindex="8"
|
|
|
+ onselect="onSelectionChange()">
|
|
|
+ <treecols>
|
|
|
+ <treecol label="&col.name;" width="100" id="chanColName"/>
|
|
|
+diff --git a/suite/extensions/irc/xul/skin/channels.css b/suite/extensions/irc/xul/skin/channels.css
|
|
|
+--- a/suite/extensions/irc/xul/skin/channels.css
|
|
|
++++ b/suite/extensions/irc/xul/skin/channels.css
|
|
|
+@@ -6,17 +6,17 @@
|
|
|
+ width: 12em;
|
|
|
+ }
|
|
|
+
|
|
|
+ #bottomPanel {
|
|
|
+ width: 50em;
|
|
|
+ height: 20em;
|
|
|
+ }
|
|
|
+
|
|
|
+-.platform-Mac #rightPanel {
|
|
|
++:root[platform=Mac] #rightPanel {
|
|
|
+ width: 18em;
|
|
|
+ }
|
|
|
+
|
|
|
+ #loadContainer {
|
|
|
+ margin: 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ #loadBar {
|