Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add project name to main window title #103

Merged
Merged
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
Add project name to main window title
  • Loading branch information
gedakc committed May 22, 2017
commit d0afce48b4264162548a62aa2b6f8ddd3ae88833
10 changes: 9 additions & 1 deletion manuskript/mainWindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,12 @@ def loadProject(self, project, loadFromFile=True):
for i in [self.actSave, self.actSaveAs, self.actCloseProject,
self.menuEdit, self.menuView, self.menuTools, self.menuHelp]:
i.setEnabled(True)
# FIXME: set Window's name: project name

# Add project name to Window's name
pName = os.path.split(project)[1]
if pName.endswith('.msk'):
pName=pName[:-4]
self.setWindowTitle(pName + " - " + self.tr("Manuskript"))

# Stuff
# self.checkPersosID() # Should'n be necessary any longer
Expand Down Expand Up @@ -398,6 +403,9 @@ def closeProject(self):
self.menuEdit, self.menuView, self.menuTools, self.menuHelp]:
i.setEnabled(False)

# Set Window's name - no project loaded
self.setWindowTitle(self.tr("Manuskript"))

# Reload recent files
self.welcome.updateValues()

Expand Down