Skip to content
This repository has been archived by the owner on Apr 6, 2021. It is now read-only.

moved user/tabs/@show to state/tabs/@show #238

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions plugins/c9.ide.editors/tabmanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ define(function(require, module, exports) {

menus.addItemByPath("View/Tab Buttons", new apf.item({
type: "check",
checked: "user/tabs/@show",
checked: "state/tabs/@show",
command: "toggleButtons"
}), 300, plugin);

Expand Down Expand Up @@ -196,11 +196,10 @@ define(function(require, module, exports) {
settings.on("read", function(e) {
// Defaults
settings.setDefaults("user/tabs", [
["show", "true"],
["title", "false"],
["asterisk", "false"]
]);
settings.setDefaults("state/tabs", []);
settings.setDefaults("state/tabs", [ ]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean to move ["show", "true"], here?


// Corner Handling
collapsedMenu = settings.getBool("state/menus/@minimized");
Expand Down Expand Up @@ -228,7 +227,7 @@ define(function(require, module, exports) {
}
isReady = true;

showTabs = settings.getBool("user/tabs/@show");
showTabs = settings.getBool("state/tabs/@show");
toggleButtons(showTabs);
}, 0);

Expand Down Expand Up @@ -449,7 +448,7 @@ define(function(require, module, exports) {
emit.sticky("paneCreate", { pane: pane }, pane);
});

if (!settings.getBool("user/tabs/@show"))
if (!settings.getBool("state/tabs/@show"))
ui.setStyleClass(pane.aml.$ext, "notabs", ["notabs"]);

changed = true;
Expand Down Expand Up @@ -806,7 +805,7 @@ define(function(require, module, exports) {
function toggleButtons(to) {
showTabs = to !== undefined ? to : !showTabs;

settings.set("user/tabs/@show", showTabs);
settings.set("state/tabs/@show", showTabs);
emit("visible", {value: showTabs});

getPanes(container).forEach(function(pane) {
Expand Down