2009-06-01 09:55:11 +00:00
|
|
|
# Created By: Virgil Dupras
|
|
|
|
# Created On: 2009-05-17
|
2012-03-15 18:28:40 +00:00
|
|
|
# Copyright 2012 Hardcoded Software (http://www.hardcoded.net)
|
2009-08-05 08:59:46 +00:00
|
|
|
#
|
2010-09-30 10:17:41 +00:00
|
|
|
# This software is licensed under the "BSD" License as described in the "LICENSE" file,
|
2009-08-05 08:59:46 +00:00
|
|
|
# which should be included with this package. The terms are also available at
|
2010-09-30 10:17:41 +00:00
|
|
|
# http://www.hardcoded.net/licenses/bsd_license
|
2009-06-01 09:55:11 +00:00
|
|
|
|
2011-04-21 15:17:19 +00:00
|
|
|
from core.scanner import ScanType
|
2009-06-01 09:55:11 +00:00
|
|
|
|
2010-10-04 13:29:00 +00:00
|
|
|
from ..base.preferences import Preferences as PreferencesBase
|
2009-06-01 09:55:11 +00:00
|
|
|
|
|
|
|
class Preferences(PreferencesBase):
|
2010-08-15 10:27:15 +00:00
|
|
|
def _load_specific(self, settings):
|
2011-04-21 15:17:19 +00:00
|
|
|
get = self.get_value
|
|
|
|
self.scan_type = get('ScanType', self.scan_type)
|
|
|
|
self.match_scaled = get('MatchScaled', self.match_scaled)
|
2009-06-01 09:55:11 +00:00
|
|
|
|
|
|
|
def _reset_specific(self):
|
2011-04-21 15:17:19 +00:00
|
|
|
self.scan_type = ScanType.FuzzyBlock
|
2009-06-01 09:55:11 +00:00
|
|
|
self.filter_hardness = 95
|
|
|
|
self.match_scaled = False
|
|
|
|
|
2010-08-15 10:27:15 +00:00
|
|
|
def _save_specific(self, settings):
|
2011-04-21 15:17:19 +00:00
|
|
|
set_ = self.set_value
|
|
|
|
set_('ScanType', self.scan_type)
|
|
|
|
set_('MatchScaled', self.match_scaled)
|
2009-06-01 09:55:11 +00:00
|
|
|
|