Save state of remote API checkbox to preferences
This commit is contained in:
parent
426745fdb4
commit
9f9d2221db
@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>600</width>
|
||||
<height>300</height>
|
||||
<height>323</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@ -299,7 +299,7 @@
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>(see the <a href="https://foosoft.net/projects/yomichan-ext">extension page</a> for details)</string>
|
||||
<string>(see the <a href="https://foosoft.net/projects/yomichan-chrome">extension page</a> for details)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -15,5 +15,6 @@
|
||||
"tags": [],
|
||||
"wordWrap": false,
|
||||
"allowEditing": true,
|
||||
"enableRemoteApi": false,
|
||||
"firstRun": true
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ except AttributeError:
|
||||
class Ui_DialogPreferences(object):
|
||||
def setupUi(self, DialogPreferences):
|
||||
DialogPreferences.setObjectName(_fromUtf8("DialogPreferences"))
|
||||
DialogPreferences.resize(600, 300)
|
||||
DialogPreferences.resize(600, 323)
|
||||
self.verticalLayout = QtGui.QVBoxLayout(DialogPreferences)
|
||||
self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
|
||||
self.tabWidget = QtGui.QTabWidget(DialogPreferences)
|
||||
@ -227,7 +227,7 @@ class Ui_DialogPreferences(object):
|
||||
item = self.tableFields.horizontalHeaderItem(1)
|
||||
item.setText(_translate("DialogPreferences", "Value", None))
|
||||
self.checkEnableRemoteApi.setText(_translate("DialogPreferences", "Enable remote API", None))
|
||||
self.label_3.setText(_translate("DialogPreferences", "(see the <a href=\"https://foosoft.net/projects/yomichan-ext\">extension page</a> for details)", None))
|
||||
self.label_3.setText(_translate("DialogPreferences", "(see the <a href=\"https://foosoft.net/projects/yomichan-chrome\">extension page</a> for details)", None))
|
||||
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tabAnki), _translate("DialogPreferences", "Anki", None))
|
||||
|
||||
import resources_rc
|
||||
|
@ -51,6 +51,7 @@ class DialogPreferences(QtGui.QDialog, gen.preferences_ui.Ui_DialogPreferences):
|
||||
self.checkStripReadings.setChecked(self.preferences['stripReadings'])
|
||||
self.spinMaxResults.setValue(self.preferences['maxResults'])
|
||||
self.spinScanLength.setValue(self.preferences['scanLength'])
|
||||
self.checkEnableRemoteApi.setChecked(self.preferences['enableRemoteApi'])
|
||||
|
||||
self.updateSampleText()
|
||||
font = self.textSample.font()
|
||||
@ -71,6 +72,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['enableRemoteApi'] = self.checkEnableRemoteApi.isChecked()
|
||||
self.preferences['firstRun'] = False
|
||||
|
||||
if self.anki is not None:
|
||||
|
Loading…
Reference in New Issue
Block a user