Disable debugging messages from PreviewedWindowNavigator

Change the debug filter to allow exclusion, not just inclusion.
This commit is contained in:
Ole Jørgen Brønner
2017-09-18 10:20:38 +02:00
parent 3f880f0d35
commit e0381329fc
+8 -9
View File
@@ -37,15 +37,15 @@ function _repl() {
})
}
debug_all = true;
debug_filter = {};
debug_all = true; // Consider the default value in `debug_filter` to be true
debug_filter = { "#preview": false };
debug = () => {
if (!debug_all) {
let keyword = arguments[0];
if (!debug_filter[keyword])
return;
}
print(Array.prototype.join.call(arguments, " | "));
let keyword = arguments[0];
let filter = debug_filter[keyword];
if (filter === false)
return;
if (debug_all || filter === true)
print(Array.prototype.join.call(arguments, " | "));
}
@@ -607,7 +607,6 @@ PreviewedWindowNavigator = new Lang.Class({
},
_onDestroy: function() {
// this._selectedIndex is gone here, which might be the problem
debug('#preview', 'onDestroy', this.was_accepted);
if(!this.was_accepted && this._selectedIndex != focus()) {
debug('#preview', 'Abort', global.display.focus_window.title);