1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2024-11-19 21:39:02 +00:00

[#20 state:fixed] Added default excludes to the windows version.

--HG--
extra : convert_revision : svn%3Ac306627e-7827-47d3-bdf0-9a457c9553a1/trunk%4031
This commit is contained in:
hsoft 2009-06-10 09:46:24 +00:00
parent 47117da6da
commit 126de70967

View File

@ -6,12 +6,22 @@
# Copyright 2009 Hardcoded Software (http://www.hardcoded.net) # Copyright 2009 Hardcoded Software (http://www.hardcoded.net)
from dupeguru import data from dupeguru import data
from dupeguru.directories import Directories as DirectoriesBase, STATE_EXCLUDED
from base.app import DupeGuru as DupeGuruBase from base.app import DupeGuru as DupeGuruBase
from details_dialog import DetailsDialog from details_dialog import DetailsDialog
from preferences import Preferences from preferences import Preferences
from preferences_dialog import PreferencesDialog from preferences_dialog import PreferencesDialog
class Directories(DirectoriesBase):
ROOT_PATH_TO_EXCLUDE = frozenset(['windows', 'program files'])
def _default_state_for_path(self, path):
result = DirectoriesBase._default_state_for_path(self, path)
if result is not None:
return result
if len(path) == 2 and path[1].lower() in self.ROOT_PATH_TO_EXCLUDE:
return STATE_EXCLUDED
class DupeGuru(DupeGuruBase): class DupeGuru(DupeGuruBase):
LOGO_NAME = 'logo_se' LOGO_NAME = 'logo_se'
NAME = 'dupeGuru' NAME = 'dupeGuru'
@ -21,6 +31,10 @@ class DupeGuru(DupeGuruBase):
def __init__(self): def __init__(self):
DupeGuruBase.__init__(self, data, appid=4) DupeGuruBase.__init__(self, data, appid=4)
def _setup(self):
self.directories = Directories()
DupeGuruBase._setup(self)
def _update_options(self): def _update_options(self):
DupeGuruBase._update_options(self) DupeGuruBase._update_options(self)
self.scanner.min_match_percentage = self.prefs.filter_hardness self.scanner.min_match_percentage = self.prefs.filter_hardness