Pass in and update 5 x vars & CM options

This commit is contained in:
Matt Pass
2016-04-23 15:17:03 +01:00
parent 6831cea155
commit 20614885de
2 changed files with 30 additions and 12 deletions

View File

@@ -2858,7 +2858,7 @@ var ICEcoder = {
},
// Update the settings used when we make a change to them
useNewSettings: function(themeURL,codeAssist,lockedNav,tagWrapperCommand,autoComplete,visibleTabs,fontSize,lineWrapping,indentWithTabs,indentAuto,indentSize,pluginPanelAligned,bugFilePaths,bugFileCheckTimer,bugFileMaxLines,githubAuthTokenSet,updateDiffOnSave,autoLogoutMins,refreshFM) {
useNewSettings: function(themeURL,codeAssist,lockedNav,tagWrapperCommand,autoComplete,visibleTabs,fontSize,lineWrapping,lineNumbers,showTrailingSpace,matchBrackets,autoCloseTags,autoCloseBrackets,indentWithTabs,indentAuto,indentSize,pluginPanelAligned,bugFilePaths,bugFileCheckTimer,bugFileMaxLines,githubAuthTokenSet,updateDiffOnSave,autoLogoutMins,refreshFM) {
var styleNode, thisCSS, strCSS, activeLineBG;
// cut out ?microtime= at the end
@@ -2917,18 +2917,33 @@ var ICEcoder = {
thisCSS[strCSS][2].style.cssText = "background-color: " + activeLineBG + " !important";
top.ICEcoder.lineWrapping = lineWrapping;
top.ICEcoder.lineNumbers = lineNumbers;
top.ICEcoder.showTrailingSpace = showTrailingSpace;
top.ICEcoder.matchBrackets = matchBrackets;
top.ICEcoder.autoCloseTags = autoCloseTags;
top.ICEcoder.autoCloseBrackets = autoCloseBrackets;
top.ICEcoder.indentWithTabs = indentWithTabs;
top.ICEcoder.indentSize = indentSize;
top.ICEcoder.indentAuto = indentAuto;
for (var i=0;i<ICEcoder.cMInstances.length;i++) {
// Main pane
ICEcoder.content.contentWindow['cM'+ICEcoder.cMInstances[i]].setOption("lineWrapping", top.ICEcoder.lineWrapping);
ICEcoder.content.contentWindow['cM'+ICEcoder.cMInstances[i]].setOption("lineNumbers", top.ICEcoder.lineNumbers);
ICEcoder.content.contentWindow['cM'+ICEcoder.cMInstances[i]].setOption("showTrailingSpace", top.ICEcoder.showTrailingSpace);
ICEcoder.content.contentWindow['cM'+ICEcoder.cMInstances[i]].setOption("matchBrackets", top.ICEcoder.matchBrackets);
ICEcoder.content.contentWindow['cM'+ICEcoder.cMInstances[i]].setOption("autoCloseTags", top.ICEcoder.autoCloseTags);
ICEcoder.content.contentWindow['cM'+ICEcoder.cMInstances[i]].setOption("autoCloseBrackets", top.ICEcoder.autoCloseBrackets);
ICEcoder.content.contentWindow['cM'+ICEcoder.cMInstances[i]].setOption("indentWithTabs", top.ICEcoder.indentWithTabs);
ICEcoder.content.contentWindow['cM'+ICEcoder.cMInstances[i]].setOption("indentUnit", top.ICEcoder.indentSize);
ICEcoder.content.contentWindow['cM'+ICEcoder.cMInstances[i]].setOption("tabSize", top.ICEcoder.indentSize);
ICEcoder.content.contentWindow['cM'+ICEcoder.cMInstances[i]].refresh();
// Diff pane
ICEcoder.content.contentWindow['cM'+ICEcoder.cMInstances[i]+'diff'].setOption("lineWrapping", top.ICEcoder.lineWrapping);
ICEcoder.content.contentWindow['cM'+ICEcoder.cMInstances[i]+'diff'].setOption("lineNumbers", top.ICEcoder.lineNumbers);
ICEcoder.content.contentWindow['cM'+ICEcoder.cMInstances[i]+'diff'].setOption("showTrailingSpace", top.ICEcoder.showTrailingSpace);
ICEcoder.content.contentWindow['cM'+ICEcoder.cMInstances[i]+'diff'].setOption("matchBrackets", top.ICEcoder.matchBrackets);
ICEcoder.content.contentWindow['cM'+ICEcoder.cMInstances[i]+'diff'].setOption("autoCloseTags", top.ICEcoder.autoCloseTags);
ICEcoder.content.contentWindow['cM'+ICEcoder.cMInstances[i]+'diff'].setOption("autoCloseBrackets", top.ICEcoder.autoCloseBrackets);
ICEcoder.content.contentWindow['cM'+ICEcoder.cMInstances[i]+'diff'].setOption("indentWithTabs", top.ICEcoder.indentWithTabs);
ICEcoder.content.contentWindow['cM'+ICEcoder.cMInstances[i]+'diff'].setOption("indentUnit", top.ICEcoder.indentSize);
ICEcoder.content.contentWindow['cM'+ICEcoder.cMInstances[i]+'diff'].setOption("tabSize", top.ICEcoder.indentSize);