mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
Tracking the last PySol version in the config.
This commit is contained in:
parent
8098843e1e
commit
d2358c4e18
1 changed files with 6 additions and 0 deletions
|
@ -61,6 +61,7 @@ def calcCustomMouseButtonsBinding(binding_format):
|
||||||
|
|
||||||
configspec = '''
|
configspec = '''
|
||||||
[general]
|
[general]
|
||||||
|
last_version = list
|
||||||
player = string
|
player = string
|
||||||
confirm = boolean
|
confirm = boolean
|
||||||
update_player_stats = boolean
|
update_player_stats = boolean
|
||||||
|
@ -211,6 +212,7 @@ resampling = integer(0, 10)
|
||||||
|
|
||||||
class Options:
|
class Options:
|
||||||
GENERAL_OPTIONS = [
|
GENERAL_OPTIONS = [
|
||||||
|
('last_version', 'list'),
|
||||||
('player', 'str'),
|
('player', 'str'),
|
||||||
('confirm', 'bool'),
|
('confirm', 'bool'),
|
||||||
('update_player_stats', 'bool'),
|
('update_player_stats', 'bool'),
|
||||||
|
@ -302,6 +304,8 @@ class Options:
|
||||||
|
|
||||||
self.version_tuple = pysollib.settings.VERSION_TUPLE # XXX
|
self.version_tuple = pysollib.settings.VERSION_TUPLE # XXX
|
||||||
self.saved = 0 # XXX
|
self.saved = 0 # XXX
|
||||||
|
|
||||||
|
self.last_version = (2, 20, 1)
|
||||||
# options menu:
|
# options menu:
|
||||||
self.player = _("Unknown")
|
self.player = _("Unknown")
|
||||||
self.confirm = True
|
self.confirm = True
|
||||||
|
@ -589,6 +593,8 @@ class Options:
|
||||||
def save(self, filename):
|
def save(self, filename):
|
||||||
config = self._config
|
config = self._config
|
||||||
|
|
||||||
|
self.last_version = self.version_tuple
|
||||||
|
|
||||||
# general
|
# general
|
||||||
for key, t in self.GENERAL_OPTIONS:
|
for key, t in self.GENERAL_OPTIONS:
|
||||||
val = getattr(self, key)
|
val = getattr(self, key)
|
||||||
|
|
Loading…
Add table
Reference in a new issue