Bug 953970 - Disable advanced options for the Facebook and Google Talk protocol overrides, and disable 'Join Chat' for Facebook.
This commit is contained in:
Родитель
d4bc5c8758
Коммит
5c34b0152e
|
@ -315,9 +315,6 @@ var accountWizard = {
|
|||
switch (opt.type) {
|
||||
case opt.typeBool:
|
||||
var chk = document.createElement("checkbox");
|
||||
// FIXME remove the facebook specific test as soon as possible...
|
||||
if (opt.getBool() && name != "prpl-facebook-require_tls")
|
||||
chk.setAttribute("checked", "true");
|
||||
chk.setAttribute("label", text);
|
||||
chk.setAttribute("id", name);
|
||||
box.appendChild(chk);
|
||||
|
@ -327,10 +324,7 @@ var accountWizard = {
|
|||
text, name));
|
||||
break;
|
||||
case opt.typeString:
|
||||
let val = opt.getString();
|
||||
if (name == "prpl-gtalk-connect_server")
|
||||
val = "talk.google.com";
|
||||
box.appendChild(this.createTextbox(null, val, text, name));
|
||||
box.appendChild(this.createTextbox(null, opt.getString(), text, name));
|
||||
break;
|
||||
case opt.typeList:
|
||||
box.appendChild(this.createMenulist(opt.getList(), text, name));
|
||||
|
@ -409,12 +403,8 @@ var accountWizard = {
|
|||
let eltName = id + "-" + name;
|
||||
let val = this.getValue(eltName);
|
||||
// The value will be undefined if the proto specific groupbox has never been opened
|
||||
if (val === undefined) {
|
||||
if (eltName == "prpl-gtalk-connect_server")
|
||||
val = "talk.google.com";
|
||||
else if (eltName != "prpl-facebook-require_tls")
|
||||
continue;
|
||||
}
|
||||
if (val === undefined)
|
||||
continue;
|
||||
switch (opt.type) {
|
||||
case opt.typeBool:
|
||||
if (val != opt.getBool())
|
||||
|
|
|
@ -71,6 +71,13 @@ facebookProtocol.prototype = {
|
|||
get iconBaseURI() "chrome://prpl-facebook/skin/",
|
||||
get baseId() "prpl-jabber",
|
||||
|
||||
getAccount: function(aKey, aName) {
|
||||
let account = ForwardProtocolPrototype.getAccount.call(this, aKey, aName);
|
||||
account.__defineGetter__("canJoinChat", function() false);
|
||||
account.setString("connection_security", "opportunistic_tls");
|
||||
return account;
|
||||
},
|
||||
getOptions: function() EmptyEnumerator,
|
||||
getUsernameSplit: function() {
|
||||
var splits = this.base.getUsernameSplit();
|
||||
let newSplits = [];
|
||||
|
|
|
@ -44,6 +44,14 @@ gtalkProtocol.prototype = {
|
|||
get name() "Google Talk",
|
||||
get iconBaseURI() "chrome://prpl-gtalk/skin/",
|
||||
get baseId() "prpl-jabber",
|
||||
|
||||
getAccount: function(aKey, aName) {
|
||||
let account = ForwardProtocolPrototype.getAccount.call(this, aKey, aName);
|
||||
account.setString("connect_server", "talk.google.com");
|
||||
return account;
|
||||
},
|
||||
getOptions: function() EmptyEnumerator,
|
||||
|
||||
classID: Components.ID("{ad8a6454-2f5a-40c2-86ca-30062408125e}")
|
||||
};
|
||||
gtalkProtocol.prototype.__proto__ = ForwardProtocolPrototype;
|
||||
|
|
Загрузка…
Ссылка в новой задаче