提交 872edd6c 编写于 作者: M Martijn Buijs 提交者: Kentaro Wada

If there are unsaved changes, show a asterisk in window title

上级 9a56b701
......@@ -446,11 +446,13 @@ class MainWindow(QMainWindow, WindowMixin):
def setDirty(self):
self.dirty = True
self.actions.save.setEnabled(True)
self.setWindowTitle('{} - {}*'.format(__appname__, os.path.basename(self.filename)))
def setClean(self):
self.dirty = False
self.actions.save.setEnabled(False)
self.actions.create.setEnabled(True)
self.setWindowTitle('{} - {}'.format(__appname__, os.path.basename(self.filename)))
def toggleActions(self, value=True):
"""Enable/Disable widgets which depend on an opened image."""
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册