Skip to content

Commit

Permalink
Merge pull request #840 from tiamatica/iss838
Browse files Browse the repository at this point in the history
Tab buttons for editor windows
  • Loading branch information
e9gille committed Feb 23, 2022
1 parent e6c092e commit a3d8123
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,7 @@ <h2>Other</h2>
<p><label class=cb_label><input id=code_sqp type=checkbox>Show <u>q</u>uit prompt</label></p>
<p><label class=cb_label><input id=code_set type=checkbox>Show toolbar in editor/trace windows</label></p>
<p><label class=cb_label><input id=code_coq type=checkbox>Connect on quit</label></p>
<p><label class=cb_label><input id=code_fit type=checkbox>Include filename in editor title</label></p>
</div>

<!--Colours-->
Expand Down
7 changes: 5 additions & 2 deletions src/ed.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,10 +261,13 @@
ed.name = ee.name;
// Check if a filename for a source file is provided.
// Make sure it isn't duplicated in the existing name.
if (ee.filename && (ed.name.indexOf(ee.filename) === -1)) {
if (ee.filename && (ed.name.indexOf(ee.filename) === -1) && D.prf.filenameInTitle()) {
ed.name = ed.name.concat(' in ', ee.filename);
}
ed.container && ed.container.setTitle(ed.name);
if (ed.container) {
ed.container.setTitle(ed.name);
ed.container.tab.header.parent.trigger('resize');
}
D.ide.floating && $('title', ed.dom.ownerDocument).text(`${ed.name} - ${ed.ide.caption}`);
model.winid = ed.id;
model.setValue(ed.oText = ee.text.join(model.getEOL()));
Expand Down
1 change: 1 addition & 0 deletions src/prf.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ D.prf = {};
['confirmations', {}],//saved responses to TaskDialog questions
['connectOnQuit', 0], // open connection page when active session ends
['doubleClickToEdit', 1], // whether double clicking a function name in session or editor opens an editor on that function
['filenameInTitle', 1], // include filename in editor title
['floating', 0], //floating editor and tracer windows
['floatSingle', 1], //create single floating edit window
['fold', 1], //code folding
Expand Down
2 changes: 2 additions & 0 deletions src/prf_code.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
q.bc.checked = !!p.blockCursor();
q.cb.value = p.cursorBlinking();
q.coq.checked = !!p.connectOnQuit();
q.fit.checked = !!p.filenameInTitle();
q.rlh.value = p.renderLineHighlight();
q.apw.checked = !!p.autoPW();
q.ph.checked = !!p.persistentHistory();
Expand Down Expand Up @@ -89,6 +90,7 @@
p.autoPW (q.apw.checked);
p.autocompletionDelay(q.acd.value);
p.connectOnQuit (q.coq.checked);
p.filenameInTitle (q.fit.checked);
p.renderLineHighlight(q.rlh.value);
p.persistentHistory (q.ph.checked);
p.persistentHistorySize(q.phs.value);
Expand Down

0 comments on commit a3d8123

Please sign in to comment.