Skip to content

Commit

Permalink
Move project name first in window title (#1911)
Browse files Browse the repository at this point in the history
  • Loading branch information
vkbo committed Jun 4, 2024
2 parents 208c4fb + 83d2cb4 commit cbf76e6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
5 changes: 1 addition & 4 deletions novelwriter/guimain.py
Original file line number Diff line number Diff line change
Expand Up @@ -1361,10 +1361,7 @@ def _connectMenuActions(self) -> None:

def _updateWindowTitle(self, projName: str | None = None) -> None:
"""Set the window title and add the project's name."""
winTitle = CONFIG.appName
if projName is not None:
winTitle += " - %s" % projName
self.setWindowTitle(winTitle)
self.setWindowTitle(" - ".join(filter(None, [projName, CONFIG.appName])))
return

def _getTagSource(self, tag: str) -> tuple[str | None, str | None]:
Expand Down
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ flake8-pep585
flake8-pyproject
flake8-annotations
isort
pyqt5-stubs
2 changes: 1 addition & 1 deletion tests/test_dialogs/test_dlg_projectsettings.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def testDlgProjSettings_SettingsPage(qtbot, monkeypatch, nwGUI, fncPath, projPat
assert project.data.doBackup is False

nwGUI._processProjectSettingsChanges(False)
assert nwGUI.windowTitle() == "novelWriter - Project Name"
assert nwGUI.windowTitle() == "Project Name - novelWriter"

# qtbot.stop()

Expand Down

0 comments on commit cbf76e6

Please sign in to comment.