Settings used by update notification
| 321 | |
| 322 | |
| 323 | class UpdateSettings: |
| 324 | """ |
| 325 | Settings used by update notification |
| 326 | """ |
| 327 | _instance = None |
| 328 | |
| 329 | @classmethod |
| 330 | def getInstance(cls): |
| 331 | if cls._instance is None: |
| 332 | cls._instance = UpdateSettings() |
| 333 | |
| 334 | return cls._instance |
| 335 | |
| 336 | def __init__(self): |
| 337 | # Settings |
| 338 | # Updates are completely suppressed via network settings |
| 339 | # prerelease - If True, suppress prerelease notifications |
| 340 | # version - Set to release tag that user does not want notifications for |
| 341 | serviceUpdateDefaultSettings = {"prerelease": True, 'version': None} |
| 342 | self.serviceUpdateSettings = SettingsProvider.getInstance().getSettings( |
| 343 | "pyfaServiceUpdateSettings", |
| 344 | serviceUpdateDefaultSettings |
| 345 | ) |
| 346 | |
| 347 | def get(self, type): |
| 348 | return self.serviceUpdateSettings[type] |
| 349 | |
| 350 | def set(self, type, value): |
| 351 | self.serviceUpdateSettings[type] = value |
| 352 | |
| 353 | |
| 354 | class EsiSettings: |