2011-04-12 08:04:01 +00:00
|
|
|
# Copyright 2011 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-08-05 08:59:46 +00:00
|
|
|
|
2011-01-18 16:33:33 +00:00
|
|
|
from hscommon.trans import install_cocoa_trans
|
|
|
|
install_cocoa_trans()
|
|
|
|
|
2010-07-13 06:08:18 +00:00
|
|
|
from hscommon.cocoa import signature
|
2009-06-01 09:55:11 +00:00
|
|
|
|
2010-08-14 17:52:23 +00:00
|
|
|
from core.scanner import ScanType
|
2011-09-21 20:02:13 +00:00
|
|
|
|
|
|
|
from inter.app import PyDupeGuruBase
|
|
|
|
from inter.details_panel import PyDetailsPanel
|
|
|
|
from inter.directory_outline import PyDirectoryOutline
|
|
|
|
from inter.extra_fairware_reminder import PyExtraFairwareReminder
|
|
|
|
from inter.prioritize_dialog import PyPrioritizeDialog
|
|
|
|
from inter.problem_dialog import PyProblemDialog
|
|
|
|
from inter.problem_table import PyProblemTable
|
|
|
|
from inter.result_table import PyResultTable
|
|
|
|
from inter.stats_label import PyStatsLabel
|
|
|
|
from inter.app_se import DupeGuru
|
2009-06-01 09:55:11 +00:00
|
|
|
|
2010-02-03 10:55:53 +00:00
|
|
|
class PyDupeGuru(PyDupeGuruBase):
|
2009-06-01 09:55:11 +00:00
|
|
|
def init(self):
|
|
|
|
self = super(PyDupeGuru,self).init()
|
2011-09-20 22:40:27 +00:00
|
|
|
self._init(DupeGuru)
|
2009-06-01 09:55:11 +00:00
|
|
|
return self
|
|
|
|
|
|
|
|
#---Properties
|
|
|
|
def setMinMatchPercentage_(self,percentage):
|
2010-02-07 14:26:50 +00:00
|
|
|
self.py.scanner.min_match_percentage = int(percentage)
|
2009-06-01 09:55:11 +00:00
|
|
|
|
|
|
|
def setScanType_(self,scan_type):
|
|
|
|
try:
|
2010-02-07 14:26:50 +00:00
|
|
|
self.py.scanner.scan_type = [
|
2010-08-14 17:52:23 +00:00
|
|
|
ScanType.Filename,
|
|
|
|
ScanType.Contents,
|
2011-04-12 11:22:29 +00:00
|
|
|
ScanType.Folders,
|
2009-06-01 09:55:11 +00:00
|
|
|
][scan_type]
|
|
|
|
except IndexError:
|
|
|
|
pass
|
|
|
|
|
|
|
|
def setWordWeighting_(self,words_are_weighted):
|
2010-02-07 14:26:50 +00:00
|
|
|
self.py.scanner.word_weighting = words_are_weighted
|
2009-06-01 09:55:11 +00:00
|
|
|
|
|
|
|
def setMatchSimilarWords_(self,match_similar_words):
|
2010-02-07 14:26:50 +00:00
|
|
|
self.py.scanner.match_similar_words = match_similar_words
|
2009-06-01 09:55:11 +00:00
|
|
|
|
2010-02-04 12:20:38 +00:00
|
|
|
@signature('v@:i')
|
2009-06-01 09:55:11 +00:00
|
|
|
def setSizeThreshold_(self, size_threshold):
|
2010-02-07 14:26:50 +00:00
|
|
|
self.py.scanner.size_threshold = size_threshold
|
2009-06-01 09:55:11 +00:00
|
|
|
|