Merge pull request +11853 from c9/update-tabmanager

Small tabmanager tweaks
pull/248/head
Lennart C. L. Kats 2016-01-27 13:29:46 +01:00
commit c30e0b4af7
1 zmienionych plików z 7 dodań i 4 usunięć

Wyświetl plik

@ -220,13 +220,14 @@ define(function(require, module, exports) {
} }
setTimeout(function() { setTimeout(function() {
// Only set the state if we're not testing something else var wasReady = isReady;
if (options.testing != 2 && !isReady) { isReady = true;
if (options.testing != 2 && !wasReady) {
// Only fire if we're not testing something else
setState(state, !isReady, function(){ setState(state, !isReady, function(){
emit.sticky("ready"); emit.sticky("ready");
}); });
} }
isReady = true;
showTabs = settings.getBool("user/tabs/@show"); showTabs = settings.getBool("user/tabs/@show");
toggleButtons(showTabs); toggleButtons(showTabs);
@ -990,6 +991,8 @@ define(function(require, module, exports) {
} }
function open(options, callback) { function open(options, callback) {
callback = callback || function() {};
var path = options.path = util.normalizePath(options.path); var path = options.path = util.normalizePath(options.path);
var type = options.editorType; var type = options.editorType;
var editor; var editor;
@ -1889,7 +1892,7 @@ define(function(require, module, exports) {
* @param {String} [options.value] The contents of the file * @param {String} [options.value] The contents of the file
* @param {String} [options.title] The title of the tab * @param {String} [options.title] The title of the tab
* @param {String} [options.tooltip] The tooltip at the button of the tab * @param {String} [options.tooltip] The tooltip at the button of the tab
* @param {Function} callback * @param {Function} [callback]
* @param {Error} callback.err An error that might * @param {Error} callback.err An error that might
* occur during the load of the file contents. * occur during the load of the file contents.
* @param {Tab} callback.tab The created tab. * @param {Tab} callback.tab The created tab.