Skip to content

Commit f859c25

Browse files
committed
style: window titles will start with project names instead of file name
1 parent 105e844 commit f859c25

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/document/DocumentCommandHandlers.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ define(function (require, exports, module) {
104104
* String template for window title when a file is open.
105105
* @type {string}
106106
*/
107-
var WINDOW_TITLE_STRING_DOC = "{0} ({1}) " + _osDash + " {2}";
107+
var WINDOW_TITLE_STRING_DOC = "{0} " + _osDash + " {1}";
108108

109109
/**
110110
* Container for _$titleWrapper; if changing title changes this element's height, must kick editor to resize
@@ -289,7 +289,7 @@ define(function (require, exports, module) {
289289
var projectName = projectRoot.name;
290290
// Construct shell/browser window title, e.g. "• index.html (myProject) — Brackets"
291291
if (currentlyViewedPath) {
292-
windowTitle = StringUtils.format(WINDOW_TITLE_STRING_DOC, readOnlyString + _currentTitlePath, projectName, brackets.config.app_title);
292+
windowTitle = StringUtils.format(WINDOW_TITLE_STRING_DOC, readOnlyString + projectName, _currentTitlePath);
293293
// Display dirty dot when there are unsaved changes
294294
if (currentDoc && currentDoc.isDirty) {
295295
windowTitle = "• " + windowTitle;

test/spec/DocumentCommandHandlers-integ-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -925,7 +925,7 @@ define(function (require, exports, module) {
925925
expect(DocumentManager.getCurrentDocument().isDirty).toBe(false);
926926

927927
// verify no dot in titlebar
928-
const expectedTitle = "test.js (DocumentCommandHandlers-test-files) " + WINDOW_TITLE_DOT + " " + brackets.config.app_title;
928+
const expectedTitle = `DocumentCommandHandlers-test-files ${WINDOW_TITLE_DOT} test.js`;
929929
expect(testWindow.document.title).toBe(expectedTitle);
930930
if(Phoenix.browser.isTauri) {
931931
await awaitsFor(async ()=> {
@@ -945,7 +945,7 @@ define(function (require, exports, module) {
945945
expect(doc.isDirty).toBe(true);
946946

947947
// verify dot in titlebar
948-
const expectedTitle = "• test.js (DocumentCommandHandlers-test-files) " + WINDOW_TITLE_DOT + " " + brackets.config.app_title;
948+
const expectedTitle = `• DocumentCommandHandlers-test-files ${WINDOW_TITLE_DOT} test.js`;
949949
expect(testWindow.document.title).toBe(expectedTitle);
950950
if(Phoenix.browser.isTauri) {
951951
await awaitsFor(async ()=> {

0 commit comments

Comments
 (0)