kopia lustrzana https://github.com/c9/core
Reverted addition of fourth parameter to proposeLayoutChange. Added resetTheme instead.
rodzic
e8ad218fb6
commit
0d240174b3
|
@ -214,7 +214,7 @@ define(function(require, exports, module) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function proposeLayoutChange(kind, force, type, reset) {
|
function proposeLayoutChange(kind, force, type) {
|
||||||
if (!force && settings.getBool("user/general/@propose"))
|
if (!force && settings.getBool("user/general/@propose"))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -225,7 +225,7 @@ define(function(require, exports, module) {
|
||||||
ignoreTheme = true;
|
ignoreTheme = true;
|
||||||
var theme = {"dark": "flat-dark", "light": "flat-light"}[kind];
|
var theme = {"dark": "flat-dark", "light": "flat-light"}[kind];
|
||||||
settings.set("user/general/@skin", theme);
|
settings.set("user/general/@skin", theme);
|
||||||
updateTheme(!!reset, type);
|
updateTheme(false, type);
|
||||||
ignoreTheme = false;
|
ignoreTheme = false;
|
||||||
settings.set("user/general/@propose", question.dontAsk);
|
settings.set("user/general/@propose", question.dontAsk);
|
||||||
},
|
},
|
||||||
|
@ -357,6 +357,14 @@ define(function(require, exports, module) {
|
||||||
}), 300, plugin);
|
}), 300, plugin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function resetTheme(theme, type) {
|
||||||
|
ignoreTheme = true;
|
||||||
|
settings.set("user/general/@skin", theme);
|
||||||
|
updateTheme(true);
|
||||||
|
emit("themeDefaults", {theme: theme, type: type});
|
||||||
|
ignoreTheme = false;
|
||||||
|
}
|
||||||
|
|
||||||
function resize(){
|
function resize(){
|
||||||
if (c9console && tabManager) {
|
if (c9console && tabManager) {
|
||||||
var tRect = tabManager.container.$ext.getBoundingClientRect();
|
var tRect = tabManager.container.$ext.getBoundingClientRect();
|
||||||
|
@ -613,6 +621,13 @@ define(function(require, exports, module) {
|
||||||
*/
|
*/
|
||||||
initMenus: initMenus,
|
initMenus: initMenus,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Resets theme (without questioning user).
|
||||||
|
* @param {String} theme Theme to use.
|
||||||
|
* @param {String} type Type of editor to use.
|
||||||
|
*/
|
||||||
|
resetTheme: resetTheme,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the layout in one of two default modes:
|
* Sets the layout in one of two default modes:
|
||||||
* @param {"default"|"minimal"} type
|
* @param {"default"|"minimal"} type
|
||||||
|
|
Ładowanie…
Reference in New Issue