1

Add nag to make people take the time to configure Yomichan

Former-commit-id: d93128d78a3255025a916612974397c369fed869
This commit is contained in:
Alex Yatskov 2015-01-30 18:57:15 +09:00
parent 8dbbf3d6fc
commit 533f90960b
3 changed files with 11 additions and 1 deletions

View File

@ -12,5 +12,6 @@
"stripReadings": false,
"tags": [],
"wordWrap": false,
"allowEditing": true
"allowEditing": true,
"firstRun": true
}

View File

@ -69,6 +69,7 @@ class DialogPreferences(QtGui.QDialog, gen.preferences_ui.Ui_DialogPreferences):
self.preferences['maxResults'] = self.spinMaxResults.value()
self.preferences['scanLength'] = self.spinScanLength.value()
self.preferences['stripReadings'] = self.checkStripReadings.isChecked()
self.preferences['firstRun'] = False
if self.anki is not None:
self.dialogToProfile()

View File

@ -105,6 +105,14 @@ class MainWindowReader(QtGui.QMainWindow, gen.reader_ui.Ui_MainWindowReader):
self.comboTags.addItems(self.preferences['tags'])
self.applyPreferencesContent()
if self.preferences['firstRun']:
QtGui.QMessageBox.information(
self,
'Yomichan',
'This may be the first time you are running Yomichan.\nPlease take some time to configure this extension.'
)
self.onActionPreferences()
def applyPreferencesContent(self):
palette = self.textContent.palette()