# HG changeset patch # User Ian Neal # Date 1635001085 -3600 # Parent e4e533e7e6e53787970341b3d625c018c4c180e5 Bug 1736443 - Add connect button to cZ Networks Editor. r=frg a=frg diff --git a/suite/extensions/irc/locales/en-US/chrome/networks.dtd b/suite/extensions/irc/locales/en-US/chrome/networks.dtd --- a/suite/extensions/irc/locales/en-US/chrome/networks.dtd +++ b/suite/extensions/irc/locales/en-US/chrome/networks.dtd @@ -5,16 +5,18 @@ + + diff --git a/suite/extensions/irc/xul/content/networks-edit.js b/suite/extensions/irc/xul/content/networks-edit.js --- a/suite/extensions/irc/xul/content/networks-edit.js +++ b/suite/extensions/irc/xul/content/networks-edit.js @@ -152,16 +152,27 @@ var gNetworkWindow = { return; } // Repopulate the network list. this.networkList = networksGetDefaults(); this.refreshNetworks(); }, + // Connect to Network button. + onConnect: function() { + let selection = this.mNetworkList.selectedItem; + if (!selection) + return; + + let network = this.networkList[selection.id]; + if (this.onOK()) + client.dispatch("server " + network.name); + }, + // Select a network listitem. onSelectNetwork: function(aId = 0) { let header = document.getElementById("network-header"); // Remove all children. while (this.mServerList.hasChildNodes()) { this.mServerList.lastChild.remove(); } diff --git a/suite/extensions/irc/xul/content/networks-edit.xul b/suite/extensions/irc/xul/content/networks-edit.xul --- a/suite/extensions/irc/xul/content/networks-edit.xul +++ b/suite/extensions/irc/xul/content/networks-edit.xul @@ -14,22 +14,25 @@