From ea07549a092650873b0377ef3f62669bef464638 Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Fri, 7 Oct 2011 20:04:46 -0700 Subject: [PATCH] version bump, fixing dock visibility --- core/constants.py | 2 +- core/reader.py | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/core/constants.py b/core/constants.py index d93917e..2ee782e 100644 --- a/core/constants.py +++ b/core/constants.py @@ -16,7 +16,7 @@ constants = { - 'version': '0.03b', + 'version': '0.04b', 'urlUpdates': 'http://foosoft.net/projects/yomichan/dev/updates.xml', 'urlHomepage': 'https://github.com/FooSoft/yomichan/', diff --git a/core/reader.py b/core/reader.py index 62e3573..65766c0 100644 --- a/core/reader.py +++ b/core/reader.py @@ -91,6 +91,8 @@ class MainWindowReader(QtGui.QMainWindow, Ui_MainWindowReader): (self.textDefinitions, 'anchorClicked(const QUrl&)', self.onDefinitionsAnchorClicked), (self.textDefinitionSearch, 'returnPressed()', self.onDefinitionSearchReturn), (self.listDefinitions, 'itemDoubleClicked(QListWidgetItem *)', self.onDefinitionDoubleClicked), + (self.dockDefinitions, 'visibilityChanged(bool)', self.onVisibilityChanged), + (self.dockAnki, 'visibilityChanged(bool)', self.onVisibilityChanged), (self.updateFinder, 'updateSearchResult', self.onUpdaterSearchResult) ] @@ -292,6 +294,11 @@ class MainWindowReader(QtGui.QMainWindow, Ui_MainWindowReader): self.anki.browseFact(self.addedFacts[row]) + def onVisibilityChanged(self, visible): + self.actionToggleAnki.setChecked(self.dockAnki.isVisible()) + self.actionToggleDefinitions.setChecked(self.dockDefinitions.isVisible()) + + def onUpdaterSearchResult(self, result): if result and result > constants['version']: QtGui.QMessageBox.information(