Reverted addition of fourth parameter to proposeLayoutChange. Added resetTheme instead.

pull/272/head
David J. Malan 2016-03-10 05:26:53 +00:00 zatwierdzone przez nightwing
rodzic e8ad218fb6
commit 0d240174b3
1 zmienionych plików z 18 dodań i 3 usunięć

Wyświetl plik

@ -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"))
return;
@ -225,7 +225,7 @@ define(function(require, exports, module) {
ignoreTheme = true;
var theme = {"dark": "flat-dark", "light": "flat-light"}[kind];
settings.set("user/general/@skin", theme);
updateTheme(!!reset, type);
updateTheme(false, type);
ignoreTheme = false;
settings.set("user/general/@propose", question.dontAsk);
},
@ -357,6 +357,14 @@ define(function(require, exports, module) {
}), 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(){
if (c9console && tabManager) {
var tRect = tabManager.container.$ext.getBoundingClientRect();
@ -597,7 +605,7 @@ define(function(require, exports, module) {
get theme(){
return theme;
},
/**
* Returns an AMLElement that can server as a parent.
* @param {Plugin} plugin The plugin for which to find the parent.
@ -613,6 +621,13 @@ define(function(require, exports, module) {
*/
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:
* @param {"default"|"minimal"} type