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()
|
|
|
|
|
2011-04-21 15:17:19 +00:00
|
|
|
from core.scanner import ScanType
|
2009-06-01 09:55:11 +00:00
|
|
|
|
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_pe import DupeGuruPE
|
|
|
|
|
2010-02-03 10:55:53 +00:00
|
|
|
class PyDupeGuru(PyDupeGuruBase):
|
2009-06-01 09:55:11 +00:00
|
|
|
def init(self):
|
2010-02-03 10:55:53 +00:00
|
|
|
self = super(PyDupeGuru, self).init()
|
2011-09-21 20:02:13 +00:00
|
|
|
self._init(DupeGuruPE)
|
2009-06-01 09:55:11 +00:00
|
|
|
return self
|
|
|
|
|
|
|
|
def clearPictureCache(self):
|
2010-02-07 14:26:50 +00:00
|
|
|
self.py.scanner.clear_picture_cache()
|
2009-06-01 09:55:11 +00:00
|
|
|
|
2010-02-03 10:55:53 +00:00
|
|
|
#---Information
|
2009-06-01 09:55:11 +00:00
|
|
|
def getSelectedDupePath(self):
|
2010-08-11 14:39:06 +00:00
|
|
|
return str(self.py.selected_dupe_path())
|
2009-06-01 09:55:11 +00:00
|
|
|
|
|
|
|
def getSelectedDupeRefPath(self):
|
2010-08-11 14:39:06 +00:00
|
|
|
return str(self.py.selected_dupe_ref_path())
|
2009-06-01 09:55:11 +00:00
|
|
|
|
|
|
|
#---Properties
|
2011-04-21 15:17:19 +00:00
|
|
|
def setScanType_(self, scan_type):
|
|
|
|
try:
|
|
|
|
self.py.scanner.scan_type = [
|
|
|
|
ScanType.FuzzyBlock,
|
|
|
|
ScanType.ExifTimestamp,
|
|
|
|
][scan_type]
|
|
|
|
except IndexError:
|
|
|
|
pass
|
|
|
|
|
2009-06-01 09:55:11 +00:00
|
|
|
def setMatchScaled_(self,match_scaled):
|
2010-02-07 14:26:50 +00:00
|
|
|
self.py.scanner.match_scaled = match_scaled
|
2009-06-01 09:55:11 +00:00
|
|
|
|
|
|
|
def setMinMatchPercentage_(self,percentage):
|
2010-02-07 14:26:50 +00:00
|
|
|
self.py.scanner.threshold = int(percentage)
|
2009-06-01 09:55:11 +00:00
|
|
|
|