Skip to content

Commit

Permalink
Began adding partial-close collapse option
Browse files Browse the repository at this point in the history
Also moved setting-definitions.js so it wouldn't compete with settings/
for tab completion.
  • Loading branch information
Chris White committed Oct 12, 2018
1 parent 31a8e9e commit 25752b3
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app/bg/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if(false) { // Vendor files - listed here only so they'll be bundled
require('vendor/common');
}

const S = require('setting-definitions'); // in app/
const S = require('common/setting-definitions'); // in app/

/// The module exports, for use in command-line debugging
let me = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ _NAM.CFG_COLLAPSE_ON_WIN_CLOSE = 'collapse-tree-on-window-close';
_DEF[_NAM.CFG_COLLAPSE_ON_WIN_CLOSE] = true;
_VAL[_NAM.CFG_COLLAPSE_ON_WIN_CLOSE] = _vbool;

_NAM.CFG_COLLAPSE_ON_PARTIAL_WIN_CLOSE = 'collapse-tree-on-partially-open-window-close';
_DEF[_NAM.CFG_COLLAPSE_ON_PARTIAL_WIN_CLOSE] = true;
_VAL[_NAM.CFG_COLLAPSE_ON_PARTIAL_WIN_CLOSE] = _vbool;

_NAM.CFG_HIDE_HORIZONTAL_SCROLLBARS = 'hide-horizontal-scrollbars';
_DEF[_NAM.CFG_HIDE_HORIZONTAL_SCROLLBARS] = true;
_VAL[_NAM.CFG_HIDE_HORIZONTAL_SCROLLBARS] = _vbool;
Expand Down
12 changes: 10 additions & 2 deletions app/settings/manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// Note: the tabs and groups are created in the order they
// first appear in the manifest.

const S = require('setting-definitions'); // in app/
const S = require('common/setting-definitions'); // in app/

// Shortcuts for frequently-used items
function icon(cls) { return `<i class="${cls}"></i>`; }
Expand Down Expand Up @@ -110,7 +110,15 @@ vote at ${issue(125,true)}.
"group": future_i18n("When I..."),
"name": S.COLLAPSE_ON_WIN_CLOSE,
"type": "checkbox",
"label": future_i18n("Close a window, collapse its tree"),
"label": future_i18n("Close a fully-open window, collapse its tree"),
//"text": future_i18n("x-characters")
},
{
"tab": future_i18n("Behaviour"),
"group": future_i18n("When I..."),
"name": S.COLLAPSE_ON_PARTIAL_WIN_CLOSE,
"type": "checkbox",
"label": future_i18n("Close the last tab in a partly-open window, collapse its tree"),
//"text": future_i18n("x-characters")
},
{
Expand Down
2 changes: 1 addition & 1 deletion app/settings/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const spectrum = require('spectrum-colorpicker');
const Spinner = require('spin.js').Spinner;
const tinycolor = require('tinycolor2');

const S = require('setting-definitions'); // in app/
const S = require('common/setting-definitions'); // in app/

const manifest = require('./manifest');
window.manifest = manifest; //because fancy-settings pulls from there
Expand Down
2 changes: 1 addition & 1 deletion app/win/bypasser.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const $ = require('jquery');
require('lib/jstree');
const log_orig = require('loglevel');
const signals = require('signals');
const S = require('setting-definitions'); // in app/
const S = require('common/setting-definitions'); // in app/

function loginfo(...args) { log_orig.info('TabFern bypasser.js: ', ...args); };
// for some reason, log.info.bind(log, ...) would capture the log level
Expand Down
2 changes: 1 addition & 1 deletion app/win/item_tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
const $ = require('jquery');
const log_orig = require('loglevel');
const K = require('./const');
const S = require('setting-definitions'); // In app/
const S = require('common/setting-definitions'); // in app/

require('lib/jstree');
require('lib/jstree-actions');
Expand Down
2 changes: 1 addition & 1 deletion app/win/main_deps.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ module.exports = {
sorts: require('./sorts'),
T: require('./item_tree'),
M: require('./model'),
S: require('setting-definitions'), // in app/
S: require('common/setting-definitions'), // in app/
};

// Other modules used by src/view/tree.js, but not imported above yet:
Expand Down
2 changes: 1 addition & 1 deletion app/win/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
const $ = require('jquery');
require('lib/jstree');
const log = require('loglevel');
const S = require('setting-definitions'); // In app/
const S = require('common/setting-definitions'); // in app/
const K = require('./const');
const D = require('./item_details');
const T = require('./item_tree');
Expand Down

0 comments on commit 25752b3

Please sign in to comment.