set prefs and get prefs

pull/2401/head
John McLear 2014-12-27 15:08:54 +01:00
parent 444bbf4cbc
commit a151c207c2
1 changed files with 10 additions and 2 deletions

View File

@ -525,6 +525,15 @@ var pad = {
if(padcookie.getPref("showAuthorshipColors") == false){
pad.changeViewOption('showAuthorColors', false);
}
if(padcookie.getPref("showLineNumbers") == false){
pad.changeViewOption('showLineNumbers', false);
}
if(padcookie.getPref("rtlIsTrue") == true){
pad.changeViewOption('rtlIsTrue', true);
}
if(padcookie.getPref("useMonospaceFont") == true){
pad.changeViewOption('useMonospaceFont', true);
}
hooks.aCallAll("postAceInit", {ace: padeditor.ace, pad: pad});
}
},
@ -575,6 +584,7 @@ var pad = {
for (var k in opts.view)
{
pad.padOptions.view[k] = opts.view[k];
padcookie.setPref(k, opts.view[k]);
}
padeditor.setViewOptions(pad.padOptions.view);
}
@ -728,10 +738,8 @@ var pad = {
},
handleIsFullyConnected: function(isConnected, isInitialConnect)
{
pad.determineChatVisibility(isConnected && !isInitialConnect);
pad.determineAuthorshipColorsVisibility();
},
determineChatVisibility: function(asNowConnectedFeedback){
var chatVisCookie = padcookie.getPref('chatAlwaysVisible');