| ... |
... |
@@ -134,12 +134,6 @@ class OptionsParser: |
|
134
|
134
|
while new_version_list:
|
|
135
|
135
|
new.append(int(new_version_list.pop(0)))
|
|
136
|
136
|
|
|
137
|
|
- if old < [0, 14, 0, 1] and new >= [0, 14, 0, 1]:
|
|
138
|
|
- self.update_config_to_01401()
|
|
139
|
|
- if old < [0, 14, 90, 0] and new >= [0, 14, 90, 0]:
|
|
140
|
|
- self.update_config_to_014900()
|
|
141
|
|
- if old < [0, 16, 0, 1] and new >= [0, 16, 0, 1]:
|
|
142
|
|
- self.update_config_to_01601()
|
|
143
|
137
|
if old < [0, 16, 4, 1] and new >= [0, 16, 4, 1]:
|
|
144
|
138
|
self.update_config_to_01641()
|
|
145
|
139
|
if old < [0, 16, 10, 1] and new >= [0, 16, 10, 1]:
|
| ... |
... |
@@ -177,30 +171,6 @@ class OptionsParser: |
|
177
|
171
|
app.config.set_per('accounts', account, 'file_transfer_proxies',
|
|
178
|
172
|
proxies_str)
|
|
179
|
173
|
|
|
180
|
|
- def update_config_to_01401(self):
|
|
181
|
|
- if 'autodetect_browser_mailer' not in self.old_values or 'openwith' \
|
|
182
|
|
- not in self.old_values or \
|
|
183
|
|
- (self.old_values['autodetect_browser_mailer'] is False and \
|
|
184
|
|
- self.old_values['openwith'] != 'custom'):
|
|
185
|
|
- app.config.set('autodetect_browser_mailer', True)
|
|
186
|
|
- app.config.set('openwith', app.config.DEFAULT_OPENWITH)
|
|
187
|
|
- app.config.set('version', '0.14.0.1')
|
|
188
|
|
-
|
|
189
|
|
- def update_config_to_014900(self):
|
|
190
|
|
- if 'use_stun_server' in self.old_values and self.old_values[
|
|
191
|
|
- 'use_stun_server'] and not self.old_values['stun_server']:
|
|
192
|
|
- app.config.set('use_stun_server', False)
|
|
193
|
|
- if os.name == 'nt':
|
|
194
|
|
- app.config.set('autodetect_browser_mailer', True)
|
|
195
|
|
-
|
|
196
|
|
- def update_config_to_01601(self):
|
|
197
|
|
- if 'last_mam_id' in self.old_values:
|
|
198
|
|
- last_mam_id = self.old_values['last_mam_id']
|
|
199
|
|
- for account in app.config.get_per('accounts'):
|
|
200
|
|
- app.config.set_per('accounts', account, 'last_mam_id',
|
|
201
|
|
- last_mam_id)
|
|
202
|
|
- app.config.set('version', '0.16.0.1')
|
|
203
|
|
-
|
|
204
|
174
|
def update_config_to_01641(self):
|
|
205
|
175
|
for account in self.old_values['accounts'].keys():
|
|
206
|
176
|
connection_types = self.old_values['accounts'][account][
|